Im trying to work out how to save repeater fields as a json array inside a single db field. something like:
Hi,
I get sql errors when trying to save , i think i don't fully understand the data provider / model syntax as I've tried a few variations and looked around the forum for some answers, but can't quite work it out.
My current debug looks like this:
I can attach the form if needed, any help appreciated.
Thanks,
Ben
[{"title":"Work","long":-0.125243,"lat":51.511989,"type":"WORK"},{"title":"Fitness First Gym","lat":51.513201,"long":-0.138884,"type":"AMENITY"}]
Hi,
I get sql errors when trying to save , i think i don't fully understand the data provider / model syntax as I've tried a few variations and looked around the forum for some answers, but can't quite work it out.
My current debug looks like this:
Array
(
[option] => com_chronoforms6
[chronoform] => add_client_schedule
[event] => submit
[name] => xxxx
[email] => x@gmail.com
[agent] => xxxx
[agent_email] =>
[pois] => Array
(
[0] => Array
(
[title] => gggdff
[type] => place
[lat] => 666
[long] => 55
)
[1] => Array
(
[title] => gfgdsf
[type] => amenity
[lat] => 456456
[long] => 66
)
)
[undefined] =>
[send] =>
[password] => 147D914E
[b9ef1604eaada687139b7d361fdfc189] => 3l5f8j0ng5rr2jo3e2vj60nbk3
[a2e59797cfd7e007061e0cdfe2dddcbc] => ircbo9ehkp3sutkjs236lersp2
[_ga] => GA1.2.92911649.1490033135
[_gid] => GA1.2.2085845415.1506941199
[Itemid] =>
)
Array
(
[validate_fields2] => Array
(
[log] => Automatic validation enabled.
[var] => 1
)
[save_data9] => Array
(
[data] => Array
(
[created] => 2017-10-02 17:42:11
[user_id] => 0
[name] => xxxx
[text72] =>
[agent] => xxxx
[agent_email] =>
[] => Array
(
[option] => com_chronoforms6
[chronoform] => add_client_schedule
[event] => submit
[name] => xxxx
[email] => x@gmail.com
[agent] => xxxx
[agent_email] =>
[pois] => Array
(
[0] => Array
(
[title] => gggdff
[type] => place
[lat] => 666
[long] => 55
)
[1] => Array
(
[title] => gfgdsf
[type] => amenity
[lat] => 456456
[long] => 66
)
)
[undefined] =>
[send] =>
[password] => 147D914E
[b9ef1604eaada687139b7d361fdfc189] => 3l5f8j0ng5rr2jo3e2vj60nbk3
[a2e59797cfd7e007061e0cdfe2dddcbc] => ircbo9ehkp3sutkjs236lersp2
[_ga] => GA1.2.92911649.1490033135
[_gid] => GA1.2.2085845415.1506941199
[Itemid] =>
)
[date] =>
[address] =>
[type] =>
[description] =>
[pr_lat] =>
[pr_long] =>
[file_photo] =>
[bedrooms] =>
[floors] =>
[garage] =>
[cost-N-] =>
[lease] =>
[ctax] =>
[energy] =>
[comm_time] =>
[commute_type] =>
[password] => 147D914E
[email] => x@gmail.com
)
[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `jos_chronoengine_chronoforms_data_add_client_schedule` (`created`, `user_id`, `name`, `agent`, `agent_email`, `date`, `address`, `type`, `description`, `pr_lat`, `pr_long`, `file_photo`, `bedrooms`, `floors`, `garage`, `cost-N-`, `lease`, `ctax`, `energy`, `comm_time`, `commute_type`, `password`, `email`) values ('2017-10-02 17:42:11', '0', 'xxxx, 'xxxx', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '147D914E', 'x@gmail.com');
)
[var] => Array
(
[created] => 2017-10-02 17:42:11
[user_id] => 0
[name] => xxxx
[agent] => xxxx
[agent_email] =>
[date] =>
[address] =>
[type] =>
[description] =>
[pr_lat] =>
[pr_long] =>
[file_photo] =>
[bedrooms] =>
[floors] =>
[garage] =>
[cost-N-] =>
[lease] =>
[ctax] =>
[energy] =>
[comm_time] =>
[commute_type] =>
[password] => 147D914E
[email] => x@gmail.com
[aid] => 15
)
)
)
I can attach the form if needed, any help appreciated.
Thanks,
Ben