How can I prepopulate the Html Text Field from a URL?

  • Alanmwhitehead
    Asked on November 22, 2014 at 12:33 PM

    is it possible to pre-populate the (HTML) text field through URL parameters or any other way.

  • jonathan
    Replied on November 22, 2014 at 7:51 PM

    Hi,

    Unfortunately no. The TEXT(HTML) field is a Read-Only and static field and does not have an input property. So, it is not possible to do this.

    I am not sure yet what you wanted to achieve, if you can describe more, perhaps we can provide you with more appropriate suggestion.

    You should also check the Narrative Fields (link: http://widgets.jotform.com/widget/narrative_fields)

    How can I prepopulate the Html Text Field from a URL? Image 1 Screenshot 20

     

    I have a hunch that perhaps it will help in what you wanted to create.

    Thanks.

  • Alanmwhitehead
    Replied on November 23, 2014 at 5:18 AM

    Thanks for your prompt response.

    I would like to display a different image on the form based on the referring link. 

  • NeilVicente
    Replied on November 23, 2014 at 6:06 AM

    @Alanmwhitehead

    Here's a good workaround:

    1.  Include all images to your page using the "Image" control, or if you prefer, the "Text" control. Each image should use a separate form control

    2.  Add a Hidden Box field to your form. This will be used as the pseudo image selector

    Example:

    How can I prepopulate the Html Text Field from a URL? Image 1 Screenshot 30

    3.  Create conditions to make a certain image appear only if the [Hidden Box] value matches your criteria

    How can I prepopulate the Html Text Field from a URL? Image 2 Screenshot 41

    Note: Images have the same name here, but they point to different images in my sample form.

    4.  Assign the value to your hidden field by way of URL prepopulation

    Example:

    http://form.jotformpro.com/form/43263099471964?font=1

    http://form.jotformpro.com/form/43263099471964?font=2

    http://form.jotformpro.com/form/43263099471964?font=3

  • Alanmwhitehead
    Replied on November 23, 2014 at 6:14 AM

    Great thanks!