Hi,
I have a simple form that has name and 3 drop downs for year, month, and day for user date of birth. I want to concatenate the 3 values into a dob form value and only save name and dob in the database.
1) Based on the manual and other postings, i created the following custom code for dob (which is a hidden field in the form). i am not able to get the concatenation to work. What am I doing wrong?
var dbirth = {data:year}."-".{data:month}."-".{data:day};
{data.set:dob,dbirth};
Debugger O/P:
Array
(
[option] => com_chronoforms6
[chronoform] => user_registration
[event] => submit
[first_name] => Test
[last_name] => Again
[month] => 1
[day] => 1
[year] => 1975
[dob] =>
[Submit] =>
[Itemid] =>
[dob,dbirth] =>
)
2) How can I save just name and dob in the database? I provided {data:first name}, {data:last name}, {data:dob} in the data provider field, no columns get updated. If I just have {data:}, then all fields get updated (which I don;t want).
I am guessing the syntax for data provider is not right and i could find a working example anywhere. Please help.
I have a simple form that has name and 3 drop downs for year, month, and day for user date of birth. I want to concatenate the 3 values into a dob form value and only save name and dob in the database.
1) Based on the manual and other postings, i created the following custom code for dob (which is a hidden field in the form). i am not able to get the concatenation to work. What am I doing wrong?
var dbirth = {data:year}."-".{data:month}."-".{data:day};
{data.set:dob,dbirth};
Debugger O/P:
Array
(
[option] => com_chronoforms6
[chronoform] => user_registration
[event] => submit
[first_name] => Test
[last_name] => Again
[month] => 1
[day] => 1
[year] => 1975
[dob] =>
[Submit] =>
[Itemid] =>
[dob,dbirth] =>
)
2) How can I save just name and dob in the database? I provided {data:first name}, {data:last name}, {data:dob} in the data provider field, no columns get updated. If I just have {data:}, then all fields get updated (which I don;t want).
I am guessing the syntax for data provider is not right and i could find a working example anywhere. Please help.