X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding new required field in registration form (https://forum.x-cart.com/showthread.php?t=23362)

Lee 07-18-2006 01:23 AM

Adding new required field in registration form
 
Hi all,

Just looking for a bit of advice -

I am adding an additional field into our registration form that need to be a required field, under Company within the personal Information section of the form.

The tpl file for this is main/register_personal_info.tpl, and below the code for the 'company field' row -

{if $default_fields.company.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_company}</TD>
<TD>{if $default_fields.company.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="company" name="company" size="32" maxlength="255" value="{$userinfo.company}">
{if $reg_error ne "" and $userinfo.company eq "" && $default_fields.company.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

Can I just duplicate this replacing all instances of 'company' with the new field name? And what other tpl templates would I need to edit to make this change work? Obviously I would adding a field to the database so the info can be stored, but I just want to check what other templates I need to edit, if any to make this change work.

Thanks

balinor 07-18-2006 02:06 AM

Why not just add it using the 'Add new field' options in General Settings/User Registration Options?

Lee 07-18-2006 02:14 AM

Hahahahaha!!

That would be an easier way of doing it!!

Still getting used to all these options in the back-end, thanks Ryan!


All times are GMT -8. The time now is 09:30 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.