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

  • Profile Image
    Asked 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?

  • Profile Image
    Answered on November 22, 2013 at 07:11 AM


    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.


  • Profile Image
    Answered 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
    Answered 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.