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.

Giving a Hidden field a name

  1. Hello. I need to be able to populate a hidden field using Javascript with a result from an ajax query. I can do this by referring to the id which is generated in the form. However this isn't very portable and I'd like to use the same piece of js in different forms. If I could name the hidden field I could do this, however at the moment I don't seem to be able to.

    Unless you have a trick that is. The content of this field does need to arrive in the entries table otherwise I could dynamically generate the hidden input.

    Any suggestions?

    Regards

    Russell Wyatt

    Posted 10 years ago on Thursday June 30, 2011 | Permalink
  2. There is a custom parameter name you can use when populating the field dynamically using PHP, however jQuery is different. The only way to target the field using jQuery is going to be via the ID which is dynamically generated.

    If you could implement this using custom PHP you could use the parameter name, which you control, which means it could work across sites as long as you configure the field to use your custom parameter name.

    There are How To's for dynamically populating fields in the Documentation area under How To.

    Posted 10 years ago on Thursday June 30, 2011 | Permalink
  3. Hi Carl. Much as I suspected then. Can you consider this a feature request then?

    Regards

    Russell

    Posted 10 years ago on Thursday June 30, 2011 | Permalink