There are many posts on required field implementation, but I cannot seem to get the required to work despite all the solutions. There are two very specific examples for which I would appreciate some help: The checkbox: Use case is that I am putting a table with some text that contains an agreement on my signup page. I am putting a checkbox below. I would like for that checkbox to be a required field before the user can submit the form, just like the native fields in aMember. In this case, i am going to map the checkbox to the already existent field "i_agree". Here is the code: Code: <tr> <td><input class="required: true" type="checkbox" name="i_agree" value="1" {if $smarty.request.i_agree}checked="checked"{/if} /> I Agree </td> </tr> I expected that if this box were not checked, it would return a notice in the red error box at the top of the screen and prevent me from moving forward. It does not. I have seen several posts where the required variable is posted in two different ways. Sometimes it is Code: class="required" and sometimes it is Code: class="required: true" Which is it? Text Field: I have a "Company Field" that I want only to show to people signing up for certain products. Using the pricing group links, I am segmenting the signups. Works like a charm. I have followed the instructions and added the Company field in the CP, and set it as do not show. I then inserted the following code into my form, and it shows up. Only issue is that it is not forcing that this field be required before the user moves on, and no error message is showing in the red area. Code: <tr> <th><b>Company/Winery Name*{$a_req}</label></b><br /> <div class="small"></div></th> <td><input type="text" class="required" id="company" name="company" value="{$smarty.request.company|escape}" size="40" /> </td> </tr> Last Issue: Text Area on the signup form I have added a field in the CP called "comments" and set it as type text area. The type probably doesn't matter because I have set it to "don't show" by default because I want to only show this field to some people signing up for certain products again by pricing group link. I can get this field to show up no problem so long as it is type text, but if I change it to text area, the code below it shows up in the text area! This may be a very silly question, and I am new to this, but how do I fix this code so that the comment field shows as a text area on the form for the users? I would like 30 columns and 9 rows. Code: <tr> <th><b>Comments/Notes{$a_req}</label></b><br /> <div class="small"></div></th> <td><input type="text" id="comments" name="comments" value="{$smarty.request.comments|escape}" size="50" /> </td> </tr> Thanks!
For first two issues I need to check exact signup.html template that you use. In regards to textarea try this: Code: <tr> <th><b>Comments/Notes{$a_req}</label></b><br /> <div class="small"></div></th> <td><textarea id="comments" name="comments" rows=9 cols=30>{$smarty.request.comments|escape}</textarea></td> </tr>
Please attach signup.html template that you have or contact me in helpdesk if you don't want to post it in forum.