Pass Radio Value to TextBox
Last Post 06-14-2013 11:04 AM by Chad Nash. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
NebRefUser is Offline
river guide
river guide
Posts:91
Avatar

--
06-11-2013 08:44 AM
    I think this is a simple problem but I am unable to figure it out.

    I have several radio buttons in my form, each with four options indicating the number of attendees at an event.  Based on the number selected, I would like my form to display a dollar value in a textbox showing the amount which must be paid for that event.

    So, if the individual selects "one" as the radio button option, the default value returned in the textbox for that event is $100.00 [radiobuttonvalue x $100.00].  If the user selects "two", the default value in the textbox is $200.00, and so on.

    I suspect I have to create a SQL statement to set the default value of the textbox but am not sure what that SQL statement should be.

    I do realize that I could create a separate question event for each of the radio button options which will return a default value in a specific field but since I have multiple radio buttons with similar calculations, I would like to avoid creating 20+ seperate questions events.

    Thanks for the help.

    Jim
    NebRefUser is Offline
    river guide
    river guide
    Posts:91
    Avatar

    --
    06-13-2013 06:56 PM
    Instead of trying to calculate values as demonstrated in Tutorial 20, I have used Question Events to set the default value for a textbox field. So, I have created RadioButtonOne where the first response assigns a default value to a corresponding TextBoxOne of $10.00, the second response assigns a default value of $20.00, and the third response assigns a default value to TextBoxOne of $30.00.

    The Question Events defined for RadioButtonTwo set the default value for TextBoxTwo to $100, $200, and $300.

    What I then need to do is add the values from TextBoxOne and TextBoxTwo as defined by the two radio button questions and display that as a GrandTotal. Using my examples above, if the first option was selected for RadioButtonOne and the second option for RadioButtonTwo, the values from TextBoxOne and TextBoxTwo added together and displayed in the GrandTotal would be $210.00

    Can you help me with the javascript to accomplish this? Note that I do need to pass this GrandTotal amount to may Paypal gateway so I assume that I have to create a hidden field as well.

    Thanks for your help,

    Jim
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    06-14-2013 11:04 AM
    Hi Jim,

    Thanks for your posts... You might want to search the forums or wait to see if there are other community members with similar implementations that can help. Our standard support does not cover implementing JavaScript or assisting with coding JavaScript and so forth however if you wanted us to be more directly involved (go to meetings, writing the JavaScript to handle the calculations) we do provide these services via our Premium Integration services. You can pick up hours at http://www.datasprings.com/hours

    Thanks,

    Chad


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi