Change the page's CSS entirely based on the value of one field?

  • nagaoka
    Asked on April 30, 2019 at 9:06 AM

    Hello there,

    Let's say we're facing a lot of distress because our company is going by many brands, now. Each of the brands must be somewhat isolated and cannot point to one another, nor can all be listed together in a dropdown list to point to different forms.

    I know feature requests take a lot of effort (both from me tirelessly asking and stressing its importance and also from your devs in case it becomes a feature), but it's my only hope right now, so the idea goes as such:

    Could there be a way in which we change the page's CSS entirely based on the value of one field? Or is there a way in which I can make 2 different forms sync their fields in a way that they update one another without anyone having to update them manually?

    Ideally we could have a multiple brand account/form, which would change the theme entirely based on a URI prefix (e.g. example.jotform.com/form1234 and another.jotform.com/form1234).

    The problem is that our brands share the same business rules, the only difference being the style, wallpaper, logo and brand name which must be changed.

    Because this will exponentially affect scalability from now on, I must be certain that I can or cannot accomplish this with my current forms and new ones before we can decide what steps to take next.

    If you wish to suggest alternative solutions, we're eager to hear them from you.

    Thanks in advance,

    Dan.

  • David JotForm Support Manager
    Replied on April 30, 2019 at 11:35 AM

    Unfortunately, we don't have a feature to change the style of a page based on a selection. That would require hiring a developer who can code you such a functionality in your page, or in the source code of the form.

    A workaround that comes to my mind is creating a form for each of the brands(with there own logos, styles, etc.), then create a "Container form" to display those forms inside based on the selection. Example:

    1556638224example Screenshot 10

    The idea is to add the Iframe Embed widgets in the container form, and put the link of each form in one of them, then create conditions to show the Iframe widgets based on the selection.

    In regards to the other alternative that you mention, "Make 2 different forms sync their fields in a way that they update one another without anyone having to update them manually?", unfortunately, there is no such a functionality either, the edits applied in a form do not apply to another form, each form has to be edited separately.

    Let us know if you have more questions.

  • nagaoka
    Replied on April 30, 2019 at 1:05 PM

    Hi, David,

    Yes, I am well aware of all of these options. If we were allowed to upload it to our domain, we would have, but as it stands we still have to use the form hosted in your platform (because our IT security analyst is... well, let the words populate your imagination). Iframes are inelegant, sluggish and there are a few reasons why we're not considering them.

    But it's not that I wasn't expecting such an answer and not the first time you guys suggest that I upload the source code somewhere else so I can further tamper with the code. I will try asking some friends from infrastructure if that's a possibility at all. Thanks for the quick reply.

    Warm regards,

    Dan.