• I am trying to use Simple Fields to take the results from the radio button selection in html into a shopping cart URL. I went through tutorial 1 with no difficulty. However, I cannot figure out from tutorial 2 how to set a variable using HTML forms (input type=”radio” name=”qty” value=”1″) and pull the user’s selection into a variable I can pass to a URL I don’t mean to ask such a basic question, but I am stuck at this step. Thank you.

    https://www.ads-software.com/extend/plugins/simple-fields/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor P?r Thernstr?m

    (@eskapism)

    Can you give a code example/snippet of what you’re trying to do?

    Thread Starter rpravder

    (@rpravder)

    The following code creates a radio button and tries to use <form action=..." to attach the results of the radio button to the [value] field in a URL that invokes the shopping cart. I also left the <a>command where the button is actually clicked which does the same thing. This is the first time I have tried to transfer variables from a form to a button to the shopping cart URL, so I am still unclear of how this is supposed to work.

    ————

    <div class="top-3">
    
    <form action="https://secure.ourshoppingcarturl.com?Quantity=[value]" method="get">
    		<p class="offer"><input type="radio" name="qty" value="1" /><strong>Qty 1 (15 day supply).?<span class="color-red">$39</span></strong>?+ Shipping</p>
    		<p class="offer"><input type="radio" name="qty" value="3" /><strong>Qty 3 (45 day supply).?<span class="color-red">$108</span></strong>? FREE shipping. SAVE 15%</p>
    		<p class="offer"><input type="radio" name="qty" value="6" /><strong>Qty 6 (90 day supply).?<span class="color-red">$198</span></strong>? FREE shipping. SAVE 19%</p>
    		</form>
    
    			<div><a href="https://secure.ourshoppingcarturl.com?Quantity=[value]" /><strong><em>Add to Cart</em></strong></a>
    
    </div>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter rpravder

    (@rpravder)

    This is the add to cart button. somehow, it didn’t come through on the above post.

    <div><a href="secure.ourshoppingcart.com?Quantity=[value]" /><strong><em>Add to Cart</em></strong>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Radio Button Installation’ is closed to new replies.