Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding new required field in registration form

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-18-2006, 01:23 AM
 
Lee Lee is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 95
 

Default 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
__________________
Lee

X-Cart 4.0.14 - heavily modified! (Linux)
www.lasertechgroup.com/uk
Reply With Quote
  #2  
Old 07-18-2006, 02:06 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Why not just add it using the 'Add new field' options in General Settings/User Registration Options?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-18-2006, 02:14 AM
 
Lee Lee is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 95
 

Default

Hahahahaha!!

That would be an easier way of doing it!!

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

X-Cart 4.0.14 - heavily modified! (Linux)
www.lasertechgroup.com/uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:07 AM.

   

 
X-Cart forums © 2001-2020