Ticket Purchases: Request for additonal validation step upon submission

  • Profile Image
    chrispp10
    Asked on February 12, 2016 at 06:32 PM

    previous support: http://www.jotform.com/answers/767296-How-to-change-functionality-of-Ticket-Purchase-widget-to-act-like-radio-button-field

     

    So I am trying to get help with the widget ticket purchases 

    It works perfectly but I am having one issue

    is it possible to have the form, once the submit button is hit, to recheck the ticket purchases widget to make sure there spots are available before submitting 

    reason being because, lets say there is one spot left in a class, but two users open the form at the same time, if the first user completes the form and submits, it should make the spot unavailable for the second user but for some reason the user is still able to submit the form with the sold out spot because it only updates if the form us refreshed or the form is opened after the submission is sent

    so if you are on the form before it is submitted it acts as though there is still spots available which ends up over selling

    so i need another check while to be made, while the form is being submitted on all user ticket purchases for each child 

    so if a user signs only one child up it will only check the first child ticket purchases and make sure all spots are available

    but if a user sign two children up ( up to 4 ) it will check all childs ticket purchases and make sure they are spots available for all , if not it mist throw some error

     

    http://stackoverflow.com/questions/4249809/reload-an-iframe-with-jquery

     

    We were looking at this, if someone can please help me implement this that would be great thanks    

    here is a clone of my form thanks https://form.jotform.com/60387393890164

     

  • Profile Image
    Welvin
    Answered on February 13, 2016 at 09:14 AM

    I can't seem to get it working. I will seek help to my colleagues for this and let you know if we came up with such solution. 

  • Profile Image
    Kevin_G
    Answered on February 13, 2016 at 10:32 PM

    I think that you could use this function, for example, take some time and refresh the content in the iFrame and then the option should not be able, the only issue that I see here is that even if you can refresh the iFrame content, you will need to have access to the source code that makes work the widget and also have access to the database where the data is saved to refresh the iFrame based in the options selected, something that is not possible to do, since you can not have access to the database or the source code if the widget.

    However, I will share you the code that I found to refresh the iFrame, it could help.

    setInterval(function(){

    document.getElementById('myIFrame').contentWindow.location.reload();

    },5000);

    The highlighted text is the ID of your iFrame.

  • Profile Image
    chrispp10
    Answered on February 14, 2016 at 01:20 AM

    Where should i implement this code?

    can you help me implement this code in a clone of my form please

  • Profile Image
    Kevin_G
    Answered on February 14, 2016 at 08:26 AM

    You should add the code between the <head></head> tags in the HTML code of your website.

    You should search the iFrame that makes work the widget and take the ID, then replace it in the function of the code above.

    For example, I got the source code of your clone and found this ID of an iFrame: customFieldFrame_32.

    Just replace the current ID on the sample code above with this one.

  • Profile Image
    chrispp10
    Answered on February 15, 2016 at 04:42 PM

    I dont have a website to embed it on 

     

    Anywhere else i can test it on ?

  • Profile Image
    Mike
    Answered on February 15, 2016 at 04:58 PM

    As far as I understand, iFrame reloading is not going to help in this case. You need a server side check to make the server to accept/decline the entry based on available slots. I have forwarded a ticket to our developers to see if some kind of additional validation can be implemented for a Ticket Purchase widget.

    We cannot provide any ETA, but we will let you know if we have any updates.

  • Profile Image
    chrispp10
    Answered on February 15, 2016 at 04:59 PM

    alright thank you so much for that

     

    so nothing i can do in the mean time?

  • Profile Image
    Jeanette
    Answered on February 15, 2016 at 05:38 PM

    Apparently nothing can be done as for the moment. The ticket is now opened and assigned to ourr widgets team.

  • Profile Image
    chrispp10
    Answered on February 16, 2016 at 04:35 PM

    Alright thank you so much and please keep me updated 

  • Profile Image
    clarkschool
    Answered on February 19, 2016 at 11:22 AM

    Is there a way to mark this question on my end so that I will also be notified when/if there is a solution? I'm having the same issue and would like to stay informed. Thank you.

  • Profile Image
    Kevin_G
    Answered on February 19, 2016 at 12:30 PM

    @clarkschool

    Since you commented on this thread you will be notified about any news here.

  • Profile Image
    Kevin_G
    Answered on May 31, 2016 at 05:02 PM

    @chrispp10

    Seems like your reply did not reach this thread; however, I found it in my email. Please post your reply opening this link in your web browser: http://www.jotform.com/answers/771368 

    Now regarding to your question, unfortunately, we have not received news from our second level regarding this thread, I will submit a comment and ask for updates here, we should update you as soon as we get some news.