Form Builder: Is it possible to automcatically change a form's layout based on URL parameters?

  • Gregg Cooke
    Asked on August 22, 2022 at 11:31 AM

    Is it possible to convert from card to classic layout *on the fly*? In other words, can I pass in an URL parameter that causes the UI to display the classic layout, regardless of what layout the form was originally created in?

  • Rose JotForm Support
    Replied on August 22, 2022 at 1:06 PM

    Hi Gregg,

    Thanks for reaching out to us for help. It is not possible to automatically convert a form's layout using URL parameters or any other methods. Also, a particular form can only have one layout.

    May we know what are you trying to achieve so we can check if we can look for a workaround to achieve your goal?

  • Rose JotForm Support
    Replied on August 22, 2022 at 1:33 PM

    Hi Gregg,

    After investigating a bit, I found a possible workaround and I hope it helps. You can create 2 separate forms in classic and card layout. Then, create the 3rd form and embed both forms using the iFrame Embed widget. Then, we can use Conditional Logic to identify which form layout to show based on the URL parameters. Here's how:

    1. Given that the 2 forms in classic and card form are already created, on the 3rd form, add 2 iFrame Embed widgets and embed both forms. Then, hide both iFrame Embed widgets to hide both forms.1661188907 6303bb2b50055  Screenshot 10
    2. Add the Get Form Page URL widget to the form. Also, remove the Submit button on the form where both forms are embedded.1661188968 6303bb68cd9a0  Screenshot 21
    3. Add a short text field, label it 'layout', and hide it. 1661189087 6303bbdf0e601  Screenshot 32
    4. Add these Hide/Show conditions to show a particular embedded form based on the URL parameters: 1661189152 6303bc209cec6  Screenshot 431661189176 6303bc38ea928  Screenshot 54
    5. Get the unique name of the hidden short text field labeled layout that we will use for the URL parameters. 1661189232 6303bc70a5e25  Screenshot 65

    After doing the aboive steps, you can create your URL parameters. Here's the URL parameters to use:

    To show card form:

    To show classic form:

    Please give it a try and let us know if you need any help.