1 / 9
Jan 2008

Hi, I'm looking to rewrite the following form code with variants from using dropdown menus into a format using radio buttons, in order to make it closer to what people usually see in donation pages for nonprofits (like any groundspring 'donate now' page - for example in this page - 18https://secure.groundspring.org/dn/index.php?id=208018)



I would like visitors to be able to select an amount, and select a project as a variant.



Below is the code I'm starting with from the "Add to Cart Button Code" (with my IDs taken out):



<form action="https://www.e-junkie.com/ecom/gb.php?c=cart&i=CODE&cl=###&ejc=2" target="ejejc" method="POST" accept-charset="UTF-8">

<span class="bodytxt">Amount</span>:<br/>

<select name="o1" size="1">

<option value="$25">$25</option>

<option value="$50">$50</option>

<option value="$100">$100</option>

<option value="$250">$250</option>

<option value="$500">$500</option>

<option value="$1000">$1000</option>

</select>

<br/>

<input type="hidden" name="on0" value="Project"/>

<span class="bodytxt">Project</span>:<br/>

<select name="os0" size="1">

<option value="Project 1">Project 1</option>

<option value="Project 2">Project 2</option>

<option value="Project 3">Project 3</option>

<option value="Project 4">Project 4</option>

<option value="Project 5">Project 5</option>

<option value="Project 6">Project 6</option>

<option value="Project 7">Project 7</option>

<option value="Project 8">Project 8</option>

</select>

<br/><br/>

<input type="image" src="https://www.e-junkie.com/ej/ejadd_to_cart.gif" border="0" alt="Add to Cart" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this.parentNode);"/>

</form>





The follosing is what I've converted to use radio input forms, but It doesn't work. It always takes the last option in the radio button input groups as variables, no matter what is selected when I press the 'submit' button (for example $1000 and Project 8):



<form action="1https://www.e-junkie.com/ecom/gb.php?c=cart&i=DON-GEN&cl=11769&ejc=21" target="ejejc" method="POST" accept-charset="UTF-8">

<span class="bodytxt">Amount:</span><br/>

<input name="o1" type="radio" value="$25" checked="checked" /> $25<br />

<input name="o1" type="radio" value="$50" /> $50<br />

<input name="o1" type="radio" value="$100" /> $100<br />

<input name="o1" type="radio" value="$250" /> $250<br />

<input name="o1" type="radio" value="$500" /> $500<br />

<input name="o1" type="radio" value="$1000" /> $1000<br />



<hr />



<input type="hidden" name="on0" value="Project"/>

Project:</span><br/>

<input name="os0" type="radio" value="Project 1" checked="checked" />Project 1<br />

<input name="os0" type="radio" value="Project 2" />Project 2<br />

<input name="os0" type="radio" value="Project 3" />Project 3<br />

<input name="os0" type="radio" value="Project 4" />Project 4<br />

<input name="os0" type="radio" value="Project 5" />Project 5<br />

<input name="os0" type="radio" value="Project 6" />Project 6<br />

<input name="os0" type="radio" value="Project 7" />Project 7<br />

<input name="os0" type="radio" value="Project 8" />Project 8<br />

<input name="" type="submit" onClick="javascript:return EJEJC_lc(this.parentNode);" />

<input type="image" src="https://www.e-junkie.com/ej/ejadd_to_cart.gif" border="0" alt="Add to Cart" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this.parentNode);"/> -->

</form>



Can this be done, or do the o1 and os0 values always have to be submitted to ejunkie.com from a option select dropdown?

  • created

    Jan '08
  • last reply

    Jul '09
  • 8

    replies

  • 3.0k

    views

  • 5

    users

  • 4

    links

9 months later

Just wanted to let you know that we have enabled support for radio-button selection of option values now, e.g. take this from our originally-provided button code:



<input type="hidden" name="on0" value="Color">

<select name="os0">

<option value="Celadon">Celadon

<option value="Heliotrope">Heliotrope

<option value="Puce">Puce

<option value="Zinnwaldite">Zinnwaldite

</select>



...and convert it into this:



<input type="hidden" name="on0" value="Color">

<input type=radio name="os0" value="Celadon">Celadon<br>

<input type=radio name="os0" value="Heliotrope">Heliotrope<br>

<input type=radio name="os0" value="Puce">Puce<br>

<input type=radio name="os0" value="Zinnwaldite">Zinnwaldite<br>

6 months later

This worked for me thanks Tyson!



However, I have a product that needs 3 options and an open text box. From my testing only the first three variables will carry over into the cart? Even when you use the code generator?

You could combine the "Variations which tell more" setting (for 2 menus and the text field) with "Variants affecting price/weight/stock/SKU" for one of the menus, but then you'd just configure all the Variants the same with only the SKU Option1value differing if the menu selection doesn't actually affect the price/weight/etc., e.g.:



ItemName C,23.00,,,Celadon,,

ItemName H,23.00,,,Heliotrope,,

ItemName P,23.00,,,Puce,,

ItemName Z,23.00,,,Zinnwaldite,,



(you'll see what the above pertains to when you enable Variants for your product).

1 month later

Do Checkbox's work?



i.e.:



<input type="hidden" name="on0" value="Color">

<input type=checkbox name="os0" value="Celadon">Celadon<br>

<input type=checkbox name="os0" value="Heliotrope">Heliotrope<br>

<input type=checkbox name="os0" value="Puce">Puce<br>

<input type=checkbox name="os0" value="Zinnwaldite">Zinnwaldite<br>

Yea that's what I thought - When I tested it, the last item in the list was always was always the selected data sent to the cart irrespective of the other box selections, if you could make this work it would be seriously useful!

2 months later

I just want to add my opinion/request as well that being able to use checkboxes as products would be very useful. I am using e-junkie to sell things that are date-related and would like the check-boxes to correlate to a calendar, visually.

Thanks for the agreement Matt,



Tyson et al, I am now building my second site where check-boxes would make a massive difference - any chance of this happening any time soon?



At a guess, the ability to use checkboxes will add an additional ancillary item to the total order on every other checkout - that's really important.



Cheers,

P