![]() |
Adding a textarea as additional field option to register.php/tpl
Hi,
Does anyone know how to go about adding the ability to create a textarea as an additional field option? As it is, only text box, check box and select are available. |
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. |
Re: Adding a textarea as additional field option to register.php/tpl
This appears to work 90% of the way - thank you very much!
The last little bit that I'm having trouble figuring out is in the admin section. I can see the textarea's additional field label in an individuals' profile page, but I can't see the actual textarea box that should be beside it. The admin tpl's for profile info look as if they should be able to display the textarea without any modification, so I must be overlooking something obvious. |
All times are GMT -8. The time now is 12:06 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.