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

    LightBox: Dynamically pass parameters during Onclick

    Asked by antoniooi on May 09, 2012 at 06:30 AM

    Hi Guys,

    Referring to my very old post below, I would like to open a new thread again and see if this is now possible on JotForm:

    http://www.jotform.com/answers/13568-How-to-pass-parameters-with-lightbox#17

    Scenario:

    I have an online registration form for people to attend a public training program (not a user account registration of which it against the JotForm's policy). As such, I have a page that contains a list of attendable public programs. Each public program has its corresponding Register Now link and when clicked, a lightbox should pop-up PREPOPULATING the program name rather than asking the users to select from a long list again.

    I did aware that JotForm had implemented its form identification mechaism by changing it from anchor ID to CLASS, of which it allows multiple links to be displayed on the same page for the same form, which is good. However, when the same link of the same form is appearing more than once on the same page, it must be same form but different parameter values in order for it to make more sense. 

    I tried to create a separate JavaScript function to new the JotFormFeecback() during on-click. This ALMOST work but it creates multiple instances of the form and keep increasing the number of instance for every repeated click. The only success is that, I was able to change the properties of the form dynamically during onclick.

    I wonder if JotForm now able to provide this feature in order for my Public Program Registration Form more user-friendly and usable. Any feedback would be highly appreciated.

    Thank you.

    P/S: Please refer to the attached link to experience the scenario stated above.

    Antonio Ooi

    Page URL:
    http://www.malaysiatraining.net/2010/11/soft-skills-training-courses.h<br/>tml

  • Profile Image
    JotForm Support

    Answered by jonathan on May 10, 2012 at 07:07 PM

    Hello Antonio,

    How does the new JotForm Feedback() actually work?
    I tried using the Feedback button on the right, I can only see the same registration form.
    How to find out if its the appropriate form required by the user is the one displayed in the lightbox form?

    Though, the parameter you mentioned have not changed yet with JotForm.
    But I am also interested on this workability and perhaps we can both check it out for the meantime.
    Then, we can maybe request for the feature if we cannot come up with a viable workaround.

    Thanks. 

     

  • Profile Image

    Answered by antoniooi on May 11, 2012 at 04:57 AM

    Hi Jonathan,

    When I say "JotFormFeecback()", I'm referring to the instantiation of your form object in terms of JavaScript, not the feedback form on my website. As mentioned in my earlier post, this is the URL for you to experience the scenario that I described above:

    http://www.malaysiatraining.net/2010/11/soft-skills-training-courses.html

    Please click on the Register Now link and notice that I'm popping up the same form without having the known Public Course to attend prepopulated.

  • Profile Image
    JotForm Support

    Answered by jonathan on May 11, 2012 at 09:18 AM

    Hi Antonio,

    Thank you for taking the time to accomodate my inquiry. =)

    Now, I am expecting something which is not happening on the page though.
    When I tried clickin-on the Register button that hover on top most., there is no lightbox that pop-up..
    I thought there should be a lightbox that will be displayed. ?

    Thanks.

  • Profile Image

    Answered by antoniooi on May 11, 2012 at 09:31 AM

    Hi Jonathan,

    First, it is no a button but a link; second, it is not labelled as Register but Register Now. Make sure you clicked on the right link on the right page. I just tested it, the form does pop-up. Please try again.

    Antonio

  • Profile Image
    JotForm Support

    Answered by jonathan on May 11, 2012 at 09:37 AM

    Hi Antonio,

    Oh my, I am truly sorry. My four eyes abandoned me again.

    Yes. I found it finally(in front of me)., those Register Now link in the page.
    Not that Register Now on top. 

    Ok I'll do some clicking. Thanks.

  • Profile Image

    Answered by antoniooi on May 11, 2012 at 09:44 AM

    Yes Jonathan,

    as you can see, I need to have such Register Now repeated under the Public Program column as part of my business requirements. Therefore, the dynamic parameter passing is important to me. Hope you and your team can help me up.

    Thanks a lot!

    Antonio

  • Profile Image

    Answered by antoniooi on May 11, 2012 at 09:48 AM

    Dear JotForm Team,

    I understand that JotForm's philosophy is to make the form creation SIMPLE to their target customers, but wouldn't it be better if JotForm can also provide a set of API for more advance users while still having such complexity hidden from those end users? As such, JotForm can extend their customer segments by including those advance users who wish to leverage JotForm's ability to the next level.

    Here, I would like suggest something regarding the issue that I posted here:

    Consider the existing code snippet supplied by JotForm:

    <script src="//jotform.me/min/g=feedback2" type="text/javascript">

    new JotformFeedback({

    formId:'xxxxxxxxxxxxxxxxx',

    base:'http://jotform.me/',

    windowTitle:'Public Program Registration',

    background:'#555555',

    fontColor:'#e0a3a3',

    type:false,

    height:500,

    width:280

    });

    </script>

    <a class="lightbox- xxxxxxxxxxxxxxxxx" style="cursor:pointer;color:blue;text-decoration:underline;">Register Now</a>

    Apparently, such anchor HTML does not contain sufficient information for JotForm to dynamically handle the default value for the required field during the Onclick event. But why 'Onclick'? -- So that the same piece of code does not need to be embedded more than once; neither the same form need to be duplicated just for the sake of different preset default value.

    Therefore, by having JotForm API, perhaps JotForm can provide something like this:

    <a class="lightbox- xxxxxxxxxxxxxxxxx" onclick="jotFormApi.AddDefaultValues('fieldName1=Value1;fieldName2=Value2');">Register Now</a>

    So during onclick, the above function can be injected to the invocation of the form before popping up. By having API of such, in future, JotForm can also provide something like this:

     

    <a class="lightbox- xxxxxxxxxxxxxxxxx" onclick="jotFormApi.ChangeAttributes('formTitle=New Title;recipientEmail=someoneelse@company.com');">Register Now</a>

     

    And later....

     

    <a class="lightbox- xxxxxxxxxxxxxxxxx" onclick="jotFormApi.ChangeAttributes('formTitle=New Title;recipientEmail=someoneelse@company.com'); jotFormApi.AddDefaultValues('fieldName1=Value1;fieldName2=Value2');">Register Now</a>

    By having such powerful feature, I do not have to duplicate the same form for my different subscribers who share the same form layout simply because I need to forward the submission to different subscribers based on different training programs selected by the site visitors.

    Of course, every company has their own branding philosophy, including JotForm, and it has to be respected. As one of your customers, this is just my feedback and suggestion. The final decision is still up to JotForm to decide.

    Thank you.

    Antonio Ooi

     

     

     

     

     

     

  • Profile Image
    JotForm Support

    Answered by jonathan on May 13, 2012 at 06:44 AM

    Hi Antonio,

    Sorry for latency in reply.

    Your feedback and input is very interesting indeed. I am sure that our dev team will find this more useful, and in fact, probably more than us here at the support team (well thats me personally saying =)). 

    Let me forward this now to our Next Level support for proper attention. I am sure you will be inform the soonest once they updated this post.

    Thanks

     

  • Profile Image

    Answered by antoniooi on May 13, 2012 at 06:55 AM

    No worries Janathan, if the feature request of such can have fast response, that makes me even more worried -- JotForm could be just entertaining me instead of taking serious consideration over my suggestion that may take time to think about.

    Your support team's responsiveness, by far, still way better than Google forums. Keep it up!

    Antonio

  • Profile Image
    JotForm Support

    Answered by jonathan on May 13, 2012 at 07:09 AM

    You are right. I agree with that too. =) 

    Thank you for the good feedback also.