Display asterisk (*) for required fields

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
hi all,
Is it possible to add an asterisk next to the labels of fields that are required in forms (registration page form, shipping & payment address pages etc). Right now, there are asterisks displaying on required fields, only if user submits form and there are required  fileds empty. Is it possible to display these asterisks by default?
13 years ago
You should just be able to go into the page that holds whatever form you're wanting to do this with and just put an asterisk next to the required fields... such as CustomerRegister.ascx, which holds the registration form.

You may want to comment out the validation code or you may end up with duplicate asterisks when the form in validated.

To comment them out, use <%-- --%> around the "RequiredFieldValidators" like this:

<%--<asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName"
ErrorMessage="<% $NopResources:Account.FirstNameIsRequired %>" ToolTip="
<%NopResources:Account.FirstNameIsRequired %>"
ValidationGroup="CreateUserForm">*</asp:RequiredFieldValidator>--%>

Thats: < % - - <code to hide> - - % > (only all together).

This is the easiest, non-code-compiling way to do it.
13 years ago
Thank you for your help :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.