flight118
Forum Replies Created
-
Solved.
Was able to solve this, I put my code in the woocommerce-complete-payment section. This section runs when a payment (any payment) succeeded.
Yeah that should work.
Thanks for helping me ??Al right, that’s clear. But I need the value in the HTML. The Javascript uses the values to calculate instant prices.
hmm, it doesn’t seem to work.
I make the code in Contact Form 7:
[radio pages class:radio_toggle "1 to 10 pages|200" "11 to 20 pages|300"]
And the result in the page is:
<input type="radio" name="pages" value="1 to 10 pages" /> <span class="wpcf7-list-item-label">1 to 10 pages</span></span><span class="wpcf7-list-item"><br /> <input type="radio" name="pages" value="11 to 20 pages" /> <span class="wpcf7-list-item-label">11 to 20 pages</span></span></span></span>
It doesn’t seem to work… Am I doing something wrong?
That looks great, I’m going to try that ??
Thanks a lot Takayuki Miyoshi!
I’m sorry, but that’s not what I mean. I know that the radio button is supposed to do that, but I don’t want that ??
If I make a radio button like this:
[radio radio-123 "100" "200"]
The visitor will see a radio button with the values 100 and 200… Which doesn’t make sense to him!
I want the radio button to DISPLAY a text at every option but have a DIFFERENT VALUE in the background…
I think there’s some miscommunication going on…
What I showed was an example of how Contact Form 7 handles VALUES of radiobuttons. Contact Form 7 sets the value of the radiobutton EXACTLY the same as the name of the option…
If I call my radio button: option_1
The value will be: option_1I want to change that!
I want to call my radiobutton: option_1
and set the value to a number: 100The name is for the website visitor to see, the value is for me to perform calculations with. If the value is called option_1, I can’t use that for any calculation of course ??
I need to define them seperately… is this possible?
True, but Contact Form 7 set the value similar to the option name. And that is a string containing letters like this:
<input class="radio_toggle" type="radio" name="service" value="option 1" />option 1 <input class="radio_toggle" type="radio" name="service" value="option 1" />option 2
What I want, is to change these unique values to make it possible to perform calculations with them, like such:
<input class="radio_toggle" type="radio" name="service" value="100" />option 1 <input class="radio_toggle" type="radio" name="service" value="200" />option 2