[Typo3] sr_feuser_register - multiple select

racco raczek at open.infi.pl
Tue Oct 11 00:33:13 CEST 2005


racco wrote:
> hello,
> 
> I was struggling to get multiple select to work, but I failed, I do not 
> know what is going on.
> 
> So this is my situation:
> 
> for multiple select field I get the values from foreign_table
> multiple selection input field is displayed correctly, it remembers its 
> selected fields during registration
> on preview screen I can see the names of options I have choosen, so it 
> is ok
> everythings breaks down when it come to save, although it is said that 
> my account was created, the values from multiple select are not in DB
> so edit displays nothing
> when I add this selection through BE, then in Edit mode it is ok, I can 
> see my selected options, but when I try to save, this data is lost
> 
> my template, hidden fields - I use [] brackets to indicate the multiple 
> character of this select input ( [fe_users][fieldname][])
> when I tried to do this without last pair of [] my preview worked, but 
> after clicking create it was turning back to form with error message: 
> Fill in fieldname (because it was required)
> 
> I believe there is either something wrong with my configuration or with 
> writing to DB. Maybe this JS function at the end of class has something 
> to do with this, I do not konw
> 
> 
> hope u can help me
> 
> 
> racco

here comes the solution:

1) do not use [] brackets in your html template, just treat this field 
as normal one
2) add following lines to your TS template setup:
plugin.tx_srfeuserregister_pi1.create.evalValues.yourNewFieldName =
plugin.tx_srfeuserregister_pi1.parseValues.yourNewFieldName = multiple


and it works smoothly :)


racco



More information about the TYPO3-english mailing list