PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Add new form fields on import?

  1. Is it possible to import additional fields into an existing form using the XML import feature?

    Posted 7 years ago on Saturday August 18, 2012 | Permalink
  2. I can't think of any way to do this automatically. What use case do you have that requires this?

    Posted 7 years ago on Sunday August 19, 2012 | Permalink
  3. I have some standard hidden fields I use for tracking that I would like to easily add to my existing forms and forms I create in the future. Creating the hidden fields by hand in the UI is slow work.

    Posted 7 years ago on Sunday August 19, 2012 | Permalink
  4. I don't know of a programmatic way to do this. Is the hidden field always different, but the tracking code stored therein different for each form or site?

    Since the field is always present in the form, how about adding to functions.php something that will pre-populate the field with the unique information, based on form ID? Without knowing what information is being stored, and how it's different, it's hard to provide specifics. But you'd have to add some code to add new fields on import, so this would likely be the same amount of work, it would just be to populate the field value, for a field which is already present, rather than modify a form on import.

    That would be less efficient, pre-populating a field value every time the form is rendered, but I'm just thinking out loud, generically.

    Posted 7 years ago on Tuesday August 21, 2012 | Permalink