Can you post fields from one form to another form using Webform in Drupal - forms

I'm using Webform in Drupal to make this page:
http://www.stuffusell.co.uk/drupal-7.4/collection-form
I want to build another child form on the home page and submit all fields (two or three in total) from that form to the corresponding fields on the fuller parent form on the link above.
I'm hoping to do this using Drupal, Webform and any suitable plugins. Is this possible?

You may try to take a look at Prepopulate module.
It allows you to populate a form's fields passing the values in the url. You just have to create your home form with the good fields'names, form action to your webform and form method to "get".

Related

tx_form multiple times on one page via RECORDS

via TypoScript i generate a HTML-Table and on every line i add the same formular (tx_form formular) via RECORDS. The form can be opened in a lightbox and all is fine but when i submit one of these, all forms will be submit and i receive 16 mails.
How can i separate the forms? RECORDS is needed because i build the table in TypoScript and so i can update the form in the backend and all forms on the page are updated.
Is there a parameter which i can set unique via TypoScript for every record so every form is technical a single form?
I would use some javascript to iterate over the forms and make them unique.
As this might conflict with the secutrity mechanism from TYPO3 you alternatively can use javascript to remove other than the currently clicked form from the page. This might need a reload from the page if you have no special answer page for the form.

Dynamic show fields Symfony2

I trying to add some fields to form depending of checkbox. But I have no idea how can I do that. I think Ajax can be useful, but I dont work with Ajax in Symfony2 yet, and if my form build up not in the controller what value I need specify in url: option of Ajax?
That's quite a broad question, but essentially: the Symfony way is to add them to the Form in the Controller by reacting to FormEvents.
Symfony Docs on Form Events
One way to achieve what you're after is to submit the form twice - the first time code will react to the checked checkbox and arrange the rest of the form as required, the second time the form will be valid and you can take action. Details on the above link. AJAX might help with this, allowing a form submission as soon as you've checked the checkbox.
Although you can create HTML form fields using AJAX, when you submit the form those fields need to exist in the Form object. You can add them just in time, in the controller, before Symfony tries to bind them.

How do I set different signup forms for the same MailChimp list?

I need to set different signup forms for the same MailChimp list. For example:
A signup form with just Name and E-mail.
A signup form with just Name, E-mail, City and Company.
A complete signup form with all fields available.
These different signup forms would be applied on different circumstances, but they would all register the subscriber on the same list.
Please let me know when this will be implemented.
Thanks a lot!
If you goto Form Builder in Mailchimp choose Embedded forms.
When in here choose the 'Naked' option.
This provides you the raw html that you can then amend. Eg. I removed the first name and last name and fields that came with it.
Be aware that if you have any required fields, you will not be able to submit form without them included. There is a link to the form editor which let's you choose which fields are required.

Contact form 7 (wordpress)

I´m using contact form 7 on my website to get customers to order
products from my Wordpress site.
But I want to let the user (customers) to add their own form fields if they want to add other products then listed in the form.
Is that possible?
Fields in the CF7 creator are inserted as a kind of shortcode/internal format, and after that it passes a parser that changes them into valid HTML form elements. What you can do, is to use DOM (Document Object Model) to create a new element - but then, you should definitely pay attention to your PHP code afterwards.

How to create form that will add content in drupal?

I can create form with drupal forms api, but I don't know how to do hook to edit or add the content
In your form_submit handler, you can write the contents of your form variables (such as $form_state) to the database, or send an email, and so on.
See http://drupal.org/node/751826 for details on submitting forms.