Can the "section collapse" element be based on php script running before a section loads?

  • Profile Image
    agassiyanakut
    Asked on December 08, 2020 at 06:15 PM

    Hi There,

    I'm running a Joomla website and have the extension MembershipPro, which provides registered users a way to view content based on their subscription level. I'd like to make certain sections within my Jotform Form hidden or viewed depending on their membership/subscription level. Is there any way to inject php-code, or Joomla!/MembershipPro code/shortcode, before a section loads?

    Ultimately, I'd like to have the user fill out a setup form that will feed in their "main form" and then enable only the sections the user is allowed to view based on their subscription payment (to be handled by MembershipPro). Is this possible with JotForms?

    Nelson

  • Profile Image
    Mike_G
    Answered on December 08, 2020 at 08:47 PM

    PHP code injection is not possible within JotForm. But you can download and/or use your form Full Souce codes and make it work with your scripts to meet your requirements.

    Reference Guide: How-to-get-the-Full-Source-Code-of-your-Form

    Hiding sections on the form are also possible using conditions. The section in your form can be shown based on a field answer or status. Since passing data via URL parameters to form fields is also possible with Jotform, if you can find a way to pass the information about the level of membership your users have to a field in your form using URL parameters, perhaps you can create conditions to hide sections in your form based on the data passed to a form field from URL parameters.