Support Forums


Go Back   68 Classifieds Forums > Help & Support > v4.1 Questions & Support

Notices

 
LinkBack Thread Tools Display Modes
Old 04-22-2009, 07:41 AM   #1
Member
 
Join Date: Apr 2009
Location: South of Spain
Posts: 41
Rep Power: 1
magicosta is on a distinguished road
Default User registration extra field with multiple selection

Hi,

I would like to use extra field "extra3" in userjoin.tpl as a list with several possible choices where users can enter the different languages they speak. I have put the following code:

{if $dis_extra3=="Y"}
<p class="{cycle values="row1,row2" advance=true}">

<label for="extra">{if $req_extra3=="Y"}<span class='required'>{$smarty.const.LANG_STAR}</span>{/if}{$extra3_text}{$smarty.const.LANG_COLON}</label>

<select name="extra3[ ]" id="extra3" type="text" multiple="multiple" size="5"/ >
<option value="English">English</option>
<option value="Spanish">Spanish</option>
<option value="French">French</option>
<option value="German">German</option>
<option value="Italian">Italian</option>
<option value="Portugese">Portugese</option>
<option value="Danish">Danish</option>
<option value="Russian">Russian</option>
<option value="japonese">Japonese</option>
<option value="Chinese">Chinese</option>
<option value="Flamish">Flamish</option>
<option value="Dutch">Dutch</option>
<option value="Arabic">Arabic</option>
</select>

</p>
{/if}

The question is: What code do I have to change to see their different choices in administration/users.php

Thank you for your help


(v4.1.2 default developper)
magicosta is offline   Reply With Quote
Old 04-22-2009, 08:07 AM   #2
Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,384
Rep Power: 41
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

I believe that you would need to change two template files, users_add.tpl and users_info.tpl. These would both be in administration/templates/default/users. You would need to add the same coding as you did on the front end.
__________________
Mike-N-Tosh
v3.1.10 Developer IndianaPC.org - A community website
Sandbox v4.0.9, 4.1
Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds.
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 04-22-2009, 08:47 AM   #3
Member
 
Join Date: Apr 2009
Location: South of Spain
Posts: 41
Rep Power: 1
magicosta is on a distinguished road
Default

Hi,

Thank you for your reply.

I don't understand exactly what you mean. If I add the same code in users_add.tpl and users_info.tpl it will display just the same list as the users see when they register on userjoin.php.

it will not give the result of the different selection they have done if they select more than two languages.

I thought the code to change was in userjoin.php but I have tryed a lot of things and it doesn't work.

What do you think?
magicosta is offline   Reply With Quote
Old 04-22-2009, 09:06 AM   #4
Moderator
 
 
Join Date: Mar 2006
Posts: 4,207
Rep Power: 103
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by magicosta View Post
Hi,

I would like to use extra field "extra3" in userjoin.tpl as a list with several possible choices where users can enter the different languages they speak. I have put the following code:

{if $dis_extra3=="Y"}
<p class="{cycle values="row1,row2" advance=true}">

<label for="extra">{if $req_extra3=="Y"}<span class='required'>{$smarty.const.LANG_STAR}</span>{/if}{$extra3_text}{$smarty.const.LANG_COLON}</label>

<select name="extra3[ ]" id="extra3" type="text" multiple="multiple" size="5"/ >
<option value="English">English</option>
<option value="Spanish">Spanish</option>
<option value="French">French</option>
<option value="German">German</option>
<option value="Italian">Italian</option>
<option value="Portugese">Portugese</option>
<option value="Danish">Danish</option>
<option value="Russian">Russian</option>
<option value="japonese">Japonese</option>
<option value="Chinese">Chinese</option>
<option value="Flamish">Flamish</option>
<option value="Dutch">Dutch</option>
<option value="Arabic">Arabic</option>
</select>

</p>
{/if}

The question is: What code do I have to change to see their different choices in administration/users.php

Thank you for your help


(v4.1.2 default developper)

I think the problem is the data isnt being stored in the database to begin with. The select is defined to allow multiple selections. These are passed to the underlying script as an ARRAY but the underlying script I bet is not set up to use an array.

So your first issue of business is to modify the target script of the form to properly handle the array sent to it and get it into the database.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 04-22-2009, 09:13 AM   #5
Member
 
Join Date: Apr 2009
Location: South of Spain
Posts: 41
Rep Power: 1
magicosta is on a distinguished road
Default

Thank you Larry for your reply.

The problem is that I am not quiet sure to be able to do that!! I am far to be an expert in php coding!!

Could you help me a little bit more, I will appreciate, thank you.
magicosta is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra field Drop down list in User Registration hel68c v4 Modules / Modifications 3 02-08-2009 06:33 PM
Extra User Registration Fields island1 v4 Questions & Support 1 01-12-2009 03:32 PM
How to create dropdown list options for Extra Field in "User Registration Fields"? Success v4 Questions & Support 11 06-02-2008 10:38 AM
Can I add extra fields to user registration settings kgrinsteiner v3.1 Questions & Support 4 12-16-2007 03:03 PM
Using Extra user registration info BigOrange v3.1 Questions & Support 4 03-06-2007 05:47 PM


All times are GMT -4. The time now is 05:10 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0