my form is saving the data as individualy but when I link it with side by side form it shows the success message doesn't create or update the record in table. Please help. For this purpose I can share my application credientials as well.
Hi, my form is saving the data as individualy but when I link it with side by side form it shows the success message doesn't create or update the record in table. Please help. For this purpose I can share my application credientials as well.
Related
Hoping someone might be able to help me out. I have a custom Drupal 8 module which has a webform composite element with some settings/properties that are fields where I can either enter a webtoken to capture some data from the form or simply enter some data for later retrieving on the webform handler side. The issue is that I thought this data would be included in $_POST but it's not so I'm trying figure out how I can retrieve the data after the form is submitted. FYI, I don't even see this data being stored in the "webform_submission_data" table so not sure where it's being saved. If anyone has some sample code it would be greatly appreciated.
My last thought was that this data could be retrieved via \Drupal::configFactory() but that doesn't make sense because the data there is static and if I'm using webtokens for these fields I'm essentially capturing changing data all of the time.
Per screenshot below, I'm trying get the authnet element settings data (charge amount, authorize.net profile) from either a custom handler or even a hook after user submits the form. Note that "first_name_on_card" is indeed available in the $_POST data.
I have two drop down list on my registration page of sql type. they both fetch data from database. but my problem is that in second drop down list , i want specific data as per the option selected in dropdown list 1. how to do it?
thank you very much
There are two possibilities(well theoretically endless)..
1) You send the whole data on pageload and then filter it using javascript based on the first selection.
2) Use the ajax technique, where you send the ajax handler the selected value and then the handler queries the database and sends the relative data which you append on the second select in the runtime.
Note:- for larger tables the firstone is NOT Recommended.
Im using custom profile plugin found at http://library.logicsistemi.it/images/joomla/plg_user_testprofile.zip
I have created several fields, both, optional and required and they all work. But there is a tiny problem.
When I enter some value in that custom fields and submit the form it can happen that some fields dont pass validation (which is good). However values entered are cleared and I must fill all the fields from the beggining.
Demo: http://goo.gl/eH1G2
Enter some (not all) data under the 'legend' named User Registration
Enter some (not all) data under the 'legend' named Company
Informations
Press Register button
Error message will pop in. -
Data entered in the User Registration will be saved
Data entered in the Company Informations (which are custom fields)
will not be saved.
If all required fields are entered, form will submit data to database
(which is ok).
I want that data in the Company Informations are saved, so users dont have to type in all over again.
The problem in your demo is on the template you are using.
For some reason it gives Javascript errors. These errors blocks the Javascript client side validation and your form is submitted with invalid data.
If you want only server side validation you can modify the onContentPrepareData function in your plugin by loading posted information from the user state. To do this you have to permeform a different action when user_id is not set under "Merge the profile data." comment.
I think next week I will write a new tutorial on http://library.logicsistemi.it to explain this. For now try to fix your Javascript code.
Regards
I have a form, which at the moment is a simple HTML based one, that doesn't do anything.
What I'm looking to do though, is to be able to send an email once the form has been submitted and also save the data to the database.
The problem comes, with the email sending. In the form, there is a drop down menu. The menu items are items in my suppliers model/module, which have a name and email address.
So, when I select Supplier A, the form passes validation, it needs to send Supplier A an email and save the details (this shouldn't be too hard).
I'm just not sure how I'd get the email address.
Would I need to pass some kind of parameter to a custom sendEmail() method?
All help appreciated.
Thanks
UPDATE:
Ok, so before I do the email part, I'd like to store the data in the table, named test drive.
I've created the module in the admin and a form to submit data from on the frontend end.
But I cannot seem to get the data to insert.
All help is welcome
Thanks
For sending email see this Mage_Contacts_IndexController::postAction() action or
Mage_Sales_Model_Order::sendNewOrderEmail()
If You created module with model, you can get instance of that model, insert data and then save it or You can create ResourceModel and then execute SQL.
As you maybe aware from the following post I'm new to the Zend framework and web programming so any help is greatly appreciated.
What I want to do is have a page that my users can search for clients stored on the database have the results returned via a table. I know how to do this in a traditional form -> post -> results page manner but I would like to implement the following:
Have two or more Dojo autocomplete combo boxes that the user can enter search criteria into (I've found examples of this on the web and should be ok implementing this.)
Use the text entered into the query the clients table in the DB.
Return the results in a table on the same page without having to redirect, and if possible have the table update the results as the user types into the combo boxes.
for example if the user types "Fa" for example the table will have
"Farrell
"Fagan"
"Farrelly"
As the user continues to type eg "Far" the table will have
"Farrell"
"Farrelly"
As you may have already guessed I need help with parts two and three. I've tried searching using keywords refresh and autocomplete but I've been unable to find anything that comes close to what I need.
Can anyone please provide links to tutorials/examples of how to do this in the Zend Framework. I know code is a lot to ask for but if anyone is feeling generous go ahead.
Just in case it makes a difference I'm using Doctrine ORM to handle my models.
Thanks in advance for any replies.
Graham
The basic gist is this...
Using the AjaxContext helper, add an html context to your action.
Move your table markup into a .ajax.phtml file and replace it in your normal view with a render call
Example
<?php echo $this->render('controller-name/action-name.ajax.phtml') ?>
Add your JavaScript event handlers to the page. When requesting the AJAX content, add a format=html parameter to the request. This will trigger the AjaxContext helper, returning only your table markup which you can then inject into the page.
The best part about this approach is that it degrades gracefully. If JavaScript is disabled or not available, the page reverts to the old school form -> post -> results method.
Have a look at my AJAX pagination post here for some pointers - http://blog.philipbrown.id.au/2011/03/awesome-pagination-with-zf-paginator-ajaxcontext-and-the-html5-history-api/
This uses a page parameter in the same way you want to use your search criteria so it should do as a base reference.