Hi, I have two radio buttons on the sign up page. I need one of the radio buttons to be checked by default. How do i go about implementing it? Any help would be greatly appreciated Thanks!
If that is a product selection radio, just link to your signup page as http://www.yoursite.com/amember/signup.php?product_id=111 (replace 111 to your actual product#)
Add this to the top of signup.php: PHP: if(!$_GET[product_id]) {$_REQUEST[product_id] = $_GET[product_id] = 1; // 1 is a number of product that should be selected}
For anyone trying to pass parameters via URL to a signup form to preselect a product (using radio buttons brick) here's what worked for me: http://www.example.com/signup/formname?product_id_page-0[]=17-24 If you inspect the code of the radio buttons, you'll find a name="some_code" and value="some-value"on the input tag: eg: Code: <input type="radio" id="product-17-24" name="product_id_page-0[]" value="17-24" data-first_price="125.00" data-second_price="125.00" checked="checked"> Just pass whatever is in the name= in the url. What you find in the value= goes after. Where this is really useful. Instead of having to create 3 forms now, you can use the same form, but users will see a different product selected based on the url parameters you pass. Enjoy! Pg