How to save in db text key of a dropdown db linked

paolino27 06 May, 2013
Hi,
How is it possible to save in the database (with save db action) the selected text key of a drow-down linked to a database table?
There's a check in the dropdown element, or i must make an array to do this?
Thanks for the help!
paolino27 06 May, 2013
Sorry i forgot to write that i use joomla 2.5 and CF 4
paolino27 07 May, 2013
hi GreyHead,

Thanks for reply,
i look the link, but i don't understood very well.
Sorry but i use chronoforms from 4 day.
In my case i have a dropdown linked (with db multi) to database keys [id] and text [title],
my form name is region.
So i must put in action a custom code, which is:

<?php
$region_array = array(
$v[id] => $v[title]
);
$form->data['region_name'] = $color_array[$form->data['region']];
?>

Which should create a column in database call region_name, is correct?
GreyHead 08 May, 2013
Hi paolino27,

Sorry there isn't enough information here for me to know if that code is useful to you or not. It seems unlikely that you need it. Saving the id of the region is probably enough??

Bob
This topic is locked and no more replies can be posted.