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.
Related
I'm currently working on a user registration form for a site I'm working on. The site requires a lot of information about users up front, and I'd like to break it down into stages.
The first stage requires the user to put in an identifier in the form of an order number. I would then check the order number exists in the system before making them continue to fill in the rest of the fields. I'm not sure how to go about doing this.
What I've managed so far though is to override the underlying User, RegistrationController and RegistrationFormType and render out a customised view with the relevant form fields.
An overview of the process I'd like would be:
FORM: ask for order number
process form and check order number exists (if not go back to 1)
FORM: ask for user information
process user information and store
complete
Simplest way of doing it will be to override registration template, and hide all fields except those you wanna show in first.
And than add some js validation rules, - to show up parts of form based on values prefilled by user. In that case you do not need to rework Sonata registration form, but for user experience it will be the same.
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.
I want do display information for the associated Account record on an invoice form.
The fields are read only and are for information to be shown for the user who is creating or editing the invoice.
From looking at this it seems to be more involved than I though.
1) To display other html on a CRM form I need to use an iframe - I can't just add a text box with an id to then populate using javascript.
2) Then to get the information from the related account record I need to do another lookup, return the field and display it.
To do the query I will do an ODATA call.
Am I on the right track ? Or am I over complicating this and is there a simpler more straighforward method.
No, as far as I know, you're unfortumately not over-complicating.
If you wish to avoid an iframe (which I would), I can suggest a little dirty trick (or hack, if you will)-
Add a text property new_dummy to the invoice entity, and add it to the invoice form.
This field will not be read or written by the invoice entity, but will just give you a placeholder to populate with the account data, which you will retrieve with JS.
(yes, this is quite ugly, I know :))
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".
I'm looking to create a new contact form for enquiries on Magento. Creating a module from scratch for this seems like a bit of a waste of time. Does anyone know the most sensible and quickest way for this to happen?
Thanks!
In CMS>Manage Pages create and enable a new page (or you could use a static block) e.g. call the page My Contact Form with a url ID of my-contact-form and a layout that matches your theme. For the content of the new page add
{{block type='core/template' template='contacts/mycontactform.phtml'}}
Now in your template folder (app/design/frontend/default/default/template/contacts for default theme in Magento 1.3.x) copy the existing form.phtml file, rename it to mycontactform.phtml and copy it back to the contacts folder. Edit the new mycontactform.phtml code and html as you wish to create your new contact form.
Load the new form by going to http://www.example.com/my-contact-form
Hope that helps...
In adendum to paj answer: You also have to edit the email template to include whatever new fields you just added.
Keep in mind that both your new contact form and Magento original contact form (an whatever future contact forms you may add in the future with in this way) will all use the same email template.
So in order to have meaningful emails sent, you need to "program" the template using the {{depend}} directive