[Typo3-dev] Split DB value and save the parts

Kraft Bernhard kraftb at gmx.net
Thu Jun 16 15:26:58 CEST 2005


Georg Ringer wrote:
> Hello,
> 
> is following scenario possible: User makes a new data record which has got
> among others the filed "name" and he writes "Max Mustermann" and saves the
> record. Now typo should split the name to first name and laste name and
> should save these two values in the DB

Do you want this to happen in the BE ? If so you could just Hook into some Hook
of tce_main and check if a submitted value is for your table. If it is it should
split up the value and set the fields correspondingly ...


If you talk about entering a record via the FE (I.e with the Frontend-User registration
or direct mail subscription) then I think it would be easier to add an extra field firstname
to the fe_users (or tt_address) table and let the user input first and last name in separate
fields


one thing you should also think about is that if you input the names in the schema "FIRST LASTNAME"
then it would be possible that someone mixes that up and enters the LASTNAME first ... this is
especially true if it is for FE Users .... (a BE Users (Editor) gets teached how he has to enter
the data ... FE - Users are "as they come")
This could be solved by simply having two fields which are properly labeld "Firstname" "Lastname"


greets,
Bernhard
-- 
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50




More information about the TYPO3-dev mailing list