Additional things with Hidden Fields

  • StPetersFL
    Asked on June 22, 2018 at 10:24 AM

    To start, I *LOVE* JotForm. It is the most powerful/capable form builder I've used and it perfectly suits all of my form-needs.


    A 'cherry on top' question:

    Is it possible to include additional text/characters with hidden fields? (example: "-{field8}" where the hyphen only appears if field8 is populated?)

    I know that that essentially happens in the default email so I'm assuming this is possible, I just am not sure exactly how (does it have to do with rows in a table?)

    Thank you again!

  • luisvcsilva
    Replied on June 22, 2018 at 11:06 AM

    I'm not sure if I understood your question, if you're trying to include additional text/string in a particular field you can use Input Mask, so every field will have a "constant" string within it's value, as you can see in the screencast below:

    1529679607GIFrecord 22 06 2018  105937 Screenshot 10

    If you're trying to include a string in a field if another one was filled, you can use conditional rules:

    1529679882GIFrecord 22 06 2018  110331 Screenshot 21

    You can use all these features with hidden fields (as well as prepopulated ones), I used visible fields in my examples for demonstrating more clearly to you.If I misunderstood your question, please clarify it to us so we can answer your inquiry accurately.

    We're glad that you like using Jotform for creating forms and we're continuously working to improve it even more. 

    Feel free to contact us,

    Thanks.

  • StPetersFL
    Replied on June 22, 2018 at 11:16 AM

    That would be a work-around, but it would work.

     

    What I'm talking about is not in the form itself, it's in the notification email that's sent as a result of the form being filled out. I'm talking about the "Hide Empty Fields" option on the 'advanced' tab when creating a response email. As I understand it (and have seen it practically) when that is turned on, any form fields included in the email that are not filled out on the form will not be included in the email.

     

    My questions is this: is it possible to tie a character or string of text to that field so that if the field is blank on the form, the whole string of text will be left out of the email?



    EXAMPLE:

    A form with three possible input fields: {name}, {email}, {message}

     

    I want to be able to set up the notification email like this:

    NAME: {name}
    EMAIL: {email}
    MESSAGE: {message}

    so that if the message field was blank, there wouldn't be "MESSAGE: " in the email, it would just have the first two lines.

    ---


    Does that make more sense? I'm not always the best at describing things.

     

    Basically, I want to be able to edit the notification email template without having to add more fields to the form as our form is already fairly large with tons of conditions built into it.

  • StPetersFL
    Replied on June 22, 2018 at 11:22 AM

    Here is a screenshot from my email (note, our form has many more questions than are titled here. How did you all make it so that if a field is empty, the title in the email doesn't display?)


    1529680933Screen Shot 2018 06 22 at 11 Screenshot 10

  • aubreybourke
    Replied on June 22, 2018 at 11:32 AM

    This is the default behavior of emails:

    1529681199p3u4c Screenshot 10

    When this is enabled and an empty field is submitted, the whole line will be stripped from the email.

    I made a demo that looks like this:

    15296813679vki5 Screenshot 21

    You can try omitting a field: https://form.jotform.com/81724717756971

    And the email you receive will only display lines of fields that were filled out.


  • StPetersFL
    Replied on June 22, 2018 at 11:43 AM

    I'm still slightly confused. In formatting the email (first screenshot) there is a box in the table that just has text ("Short Answer" in this case). That text is *NOT* included if I don't fill out short answer. (second screenshot). However, to make a table row that would have a label, that is included whether or not the field is filled out. How is that the case?
    1529682190Screen Shot 1 Screenshot 10

    1529682203Screen Shot 2 Screenshot 21

    1529682215Screen Shot 3 Screenshot 32

    1529682228Screen Shot 4 Screenshot 43

  • Victoria_K
    Replied on June 22, 2018 at 12:04 PM

    Hello,

    Unfortunately, auto-hide feature will work only within original table. If you do any modification to the table, it will be considered as a custom template and the Form Builder will stop or disable the auto-update and auto-hide. This way there is no option to control a custom template the way you want. 

    But, you can always re-add Notification template to get back an original table.

    Related guides:

    How-to-Edit-the-Email-Template-for-Notifications-and-Autoresponders

    How-to-Delete-Notifications-Autoresponder

    Setting-up-Email-Notifications

    Please let us know if you need more help.

    Thank you.

  • StPetersFL
    Replied on June 22, 2018 at 12:20 PM

    Victoria,

    I don't need it to auto-update. However, editing the form (rather than deleting it and starting again) let me essentially do what I was hoping to be able to do! 


    Thank you!

  • Mike_G JotForm Support
    Replied on June 22, 2018 at 1:14 PM

    What my colleague, Victoria, meant was the Hide Empty Fields option under the Advanced tab of the email notification only works with the default email notifier which is referred to as this — please see image below.

    1529685872t12 43 59 Screenshot 10

    Extreme changes made to that table or removing the table at all would make the Hide Empty Fields option not valid.

    Based on the requirements you stated above, you don't want the hyphen to appear in the email notification if the field after it is blank in the form.


    If that is the case, I suggest that you do what I did with this form — https://form.jotform.com/81725110823954

    Please clone the form to your account (How-to-Clone-an-Existing-Form-from-a-URL) and examine the following:

    1. There are two hidden Short Text Entry fields in the form (Short Answer hyphen and Long Answer hyphen)

    1529687577t13 12 30 Screenshot 21

    2. The conditions

    1529687609t13 13 10 Screenshot 32

    3. The email notification (specifically the email content)

    1529687673t13 14 00 Screenshot 43

    Once you have the form in your account, please test it and let us know if you have other questions or concerns.

  • StPetersFL
    Replied on June 22, 2018 at 2:25 PM

    It's unfortunate that I'll have to insert so many more empty fields/conditions into my form, but that will definitely work!


    Thank you!