What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How can I separate data from form fields with commas on the Thank You page without it looking weird?

    Asked by JeremyB on November 21, 2013 at 11:04 PM

    So, on the Thank You page I want to list some names I got from the form, like this:

    Names: Jeremy Bost, Bob Joe, Cool Name

    And you think you would just do it this way on the Thank You page:

    Names: {name1}, {name2}, {name3}

    However...due to conditional formatting not all those name field will be populated. So you might see the problem here - there could be commas separating values that are not there. Say the name2 field is not populated. The Thank You page looks like this:

    Names: Jeremy Bost, , Cool Name

    Is there a way to only show that comma and space if the form field is populated?

    form field thank you tags
  • Profile Image
    JotForm Support

    Answered by Welvin on November 22, 2013 at 07:11 AM

    Hi,

    The only way I could think you can prevent the issue is to create additional conditional logic for your the Custom Thank You Message. Match your logic to your existing logic that if the field is filled, show this thank you message. If not filled, show this thank you message page.

    Let us know if you need further assistance.

    Thanks

  • Profile Image

    Answered by JeremyB on November 22, 2013 at 09:05 AM

    Hmm, that might be a pain with as many possibilities as I have on the form I'm making. Is it possible at all to have some javascript on the Thank You page?

  • Profile Image
    JotForm Support

    Answered by KadeJM on November 22, 2013 at 11:20 AM

    It varies with how you intend to use the Javascript depending on what you want it to do since it may otherwise cause interference with the form's own scripted libraries. I think as an end result if done via the Thank You page only then it might be a chance of this being okay though it's not something I can promise or guarantee. However, I do know that you can Send Post-Data and also use PHP via the Thank You page as this is less likely to cause data problems and conflicts.