Announcement

Collapse
No announcement yet.

Create FaaS form with Option to Select Quantity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create FaaS form with Option to Select Quantity

    Hello there,

    I am working on a new FaaS form that will sell tickets to an upcoming event at our organization.

    Ticket buyers need the option to purchase multiple tickets. I would like to provide that option using a drop-down list.

    I know the HTML for drop-down lists is:

    <select name="tickets">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>

    However, I am unsure how to integrate ClickandPledge's Form Field Names (UnitPrice, ItemID, ItemName, Quantity, UnitDeductiblePercentage) to the drop-down list code.

    Could you point me to some resources? or help me develop the code?

    Thanks for your input!

    -- Katie

  • #2
    Katie,

    Glad to see you are moving forward. Before answering your question I would like to see if you like to post your code as an example so others can review. If so please let us know.

    Now answer to your question.

    The FaaS platform is designed for simple post of straight form fields. The only way I can think of for doing what you want to do is through Javascript. You are using a third party site that may or may not allow JS code to be added. JS may cause security concern for such sites as TypePad, etc.

    The easiest way to do this is by using radio buttons for each ticket. Will radio button work? if so it is easy to do it with straight HTML
    Regards,
    Click & Pledge Support Department

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

    Comment


    • #3
      Sure, I have the basic code for a drop-down list so far:

      <select id="ticket">Father Ticket (male chaperone): $75 each</select>
      <option value="0">0</option>
      <option value="75">1</option>
      <option value="150">2</option>
      <option value="225">3</option>
      <option value="300">4</option>
      <option value="375">5</option>
      </select>

      I've also tried adding the Form Field Names within the <option> tags, for example:
      <option id="UnitPrice" name="UnitPrice" value="75">1</option>
      <option id="ItemID" name="ItemID" value="75" type="hidden"></option>
      <option id="ItemName" name="ItemName" value="FatherTicket" type="hidden"></option>
      <option id="Quantity" name="Quantity" value="1" type="hidden"></option>
      <option id="UnitDeductiblePercentage" name="UnitDeductiblePercentage" value="100" type="hidden"></option>

      I am using Wordpress and apparently JavaScript can be added to posts: http://codex.wordpress.org/Using_Javascript However, I don't know enough to build JavaScript, so I'm outta luck there.

      -- Katie

      Comment


      • #4
        JavaScript is a bit messy if you don't know how to write it.

        I strongly suggest you use a radio button option .. it will work easy and you will be up in 10 minutes.
        Regards,
        Click & Pledge Support Department

        Join us @ the educational webinars: https://clickandpledge.com/webinars/
        Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

        Comment


        • #5
          I'm guessing, however, that ticket buyers can't select multiple tickets with just radio buttons? See: https://www.familyservice.us/hearts/tickets/

          Comment


          • #6
            Oh.. now I see what you are trying to do.

            Why are you doing it this way? Why not add a quantity text box?



            something like this example. That is why we have the quantity field name in there. We will do the math and post it to the API with the right format.

            will that not work?
            Regards,
            Click & Pledge Support Department

            Join us @ the educational webinars: https://clickandpledge.com/webinars/
            Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

            Comment


            • #7
              I guess I don't understand how to use "Quantity"... for example, in your sample form the html code reads:

              <input name="ItemID" type="hidden" id="ItemID" value="1" />
              <input name="ItemName" type="hidden" id="ItemName" value="Cause 1" />
              <input name="Quantity" type="hidden" id="Quantity" value="1" />

              What do I need to include to indicate that the quantity is 2 tickets or 3 tickets?

              (But yeah, I definitely think your idea is better than my radio or checkboxes!)

              Comment


              • #8
                Give me a little time to do an example so you see how this is done. It is easy.
                Regards,
                Click & Pledge Support Department

                Join us @ the educational webinars: https://clickandpledge.com/webinars/
                Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

                Comment


                • #9
                  Katie:

                  Is this what you are trying to do?

                  Regards,
                  Click & Pledge Support Department

                  Join us @ the educational webinars: https://clickandpledge.com/webinars/
                  Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

                  Comment


                  • #10
                    That's great, thank you!

                    This works great! Thank you.

                    Originally posted by Support.Department View Post
                    Katie:

                    Is this what you are trying to do?

                    https://www.clickandpledge.com/devel...s/example/003/

                    Comment

                    Working...
                    X