View Single Post
  #2  
Old 03-04-2012, 08:00 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Adding a textarea as additional field option to register.php/tpl

There is a variable called {$types} that you would need to add a new entry to.
Currently it supports:

T => "Text"
C => "Checkbox"
S => "Select box"

You will need to add
A=> "Text Area"

This variable is set in:
admin\contact_us_profiles.php and
admin\user_profiles.php

Then say you added the field to "additional info" well you would need to adjust:
main/register_additional_info.tpl after :
{elseif $v.type eq 'C'}
<input type="checkbox" name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}" value="Y"{if $v.value eq 'Y'} checked="checked"{/if} />

Add:
{elseif $v.type eq 'A'}
<textarea rows="2" cols="20" name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}" >
{$v.value}</textarea>

Or something along these lines. There may be additional steps required, I have never attempted this. Hopefully though, this will set you on the right path.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote