Forums

Record multipages

Irate 04 Feb, 2018
Hello,
I have created multipages (thank's Max for your tuto). When I save the records in a db, I have five lines if I have five pages. Is it possible to save the five pages on only one line in the DB?
Thank's
Bruno
gebonimo 04 Feb, 2018
Yes with an loop event i guess

I only did it with an area-repeater but i guess this is the same way.
Irate 05 Feb, 2018
Thank you for your reply,
But I have not understand how to use the loop_event. In my example, I have five pages. It is working without the loop, I can save the five results in the DB (but five rows)
I have put an loop_event in the page one and the save_data into the body of the loop_envent. But, I don't know how to complete Data provider.

GreyHead 09 Feb, 2018
Hi,

If you add the record id to the form data after the first save an d carry that forward to later pages using either the MultiPage actions or hidden inputs then you can update the same record. Without the record id in the form data a new records will be created.

Bob
Irate 09 Feb, 2018
Hi,
I do not know if it's flu or age, but I do not understand How to add the record ID after the first save
Thank you for your patience
Bruno
GreyHead 09 Feb, 2018
Hi Bruno,

Please add a DeBugger action after the first DB Save action and copy and paste the debug output here.

Bob
Irate 09 Feb, 2018
Here, the debug output.

Array ( [option] => com_chronoforms6 [cont] => manager [chronoform] => election ) Array ( [save_data51] => Array ( [data] => Array ( [created] => 2018-02-09 16:43:05 [user_id] => 62 [bauxpeyrat_sylvie] => [dubreucq_dominique] => [guillot_joel] => [liot_corinne] => [plantevin_eric] => [samuel_barbara] => [talagrand_richard] => [thouzery_dominique] => [vanson_valerie] => [berlureau_anne] => [cornac_marie_claude] => [decultot_stephanie] => [masse_florence] => [ramond_fabienne] => [raunet_joelle] => [thomas_sandrine] => [volpi_isabelle] => [abry_durand_isabelle] => [delsert_herve] => [duport_denis] => [lamay_lucie] => [roesch_sandrine] => [walch_olivier] => [benzada_boris] => [cuilhe_helene] => [mignon_flore] => [perez_stephanie] => [rameau_evelyne] => [saura_anthony] => [trocelier_odile] => [vives_laurent] => [belhache_benedicte] => [fernandes_yann] => [george_lydie] => [grassart_dominique] => [laborde_genevieve] => [maisonnier_sabine] => [perducat_odette] => [saadoddine_marie_claire] => [soreil_boniface_patricia] => [dumont_annie] => [faconnier_karine] => [floch_fabienne] => [lequitte_maryvonne] => [maugeais_stephane] => [morel_gilles] => [naudin_marie_christine] => [perdriel_claire] => [plouchard_delphine] => [riethmuller_helene] => [bachele_pascale] => [beulaygue_sophie] => [guerin_muriel] => [piraud_anne] => [tourbin_gaelle] => [bonnet_philip_brigitte] => [serre_christine] => [farnos_andre] => [feurtey_daniel] => [hebert_dominique] => [hounkanrin_armelle] => [portier_pascale] => [rande_nadine] => ) [_success] => Data saved successfully [log] => Array ( [0] => INSERT INTO `jnew_chronoengine_chronoforms_data_election` (`created`, `user_id`, `bauxpeyrat_sylvie`, `dubreucq_dominique`, `guillot_joel`, `liot_corinne`, `plantevin_eric`, `samuel_barbara`, `talagrand_richard`, `thouzery_dominique`, `vanson_valerie`, `berlureau_anne`, `cornac_marie_claude`, `decultot_stephanie`, `masse_florence`, `ramond_fabienne`, `raunet_joelle`, `thomas_sandrine`, `volpi_isabelle`, `abry_durand_isabelle`, `delsert_herve`, `duport_denis`, `lamay_lucie`, `roesch_sandrine`, `walch_olivier`, `benzada_boris`, `cuilhe_helene`, `mignon_flore`, `perez_stephanie`, `rameau_evelyne`, `saura_anthony`, `trocelier_odile`, `vives_laurent`, `belhache_benedicte`, `fernandes_yann`, `george_lydie`, `grassart_dominique`, `laborde_genevieve`, `maisonnier_sabine`, `perducat_odette`, `saadoddine_marie_claire`, `soreil_boniface_patricia`, `dumont_annie`, `faconnier_karine`, `floch_fabienne`, `lequitte_maryvonne`, `maugeais_stephane`, `morel_gilles`, `naudin_marie_christine`, `perdriel_claire`, `plouchard_delphine`, `riethmuller_helene`, `bachele_pascale`, `beulaygue_sophie`, `guerin_muriel`, `piraud_anne`, `tourbin_gaelle`, `bonnet_philip_brigitte`, `serre_christine`, `farnos_andre`, `feurtey_daniel`, `hebert_dominique`, `hounkanrin_armelle`, `portier_pascale`, `rande_nadine`) values ('2018-02-09 16:43:05', '62', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); ) [var] => Array ( [created] => 2018-02-09 16:43:05 [user_id] => 62 [bauxpeyrat_sylvie] => [dubreucq_dominique] => [guillot_joel] => [liot_corinne] => [plantevin_eric] => [samuel_barbara] => [talagrand_richard] => [thouzery_dominique] => [vanson_valerie] => [berlureau_anne] => [cornac_marie_claude] => [decultot_stephanie] => [masse_florence] => [ramond_fabienne] => [raunet_joelle] => [thomas_sandrine] => [volpi_isabelle] => [abry_durand_isabelle] => [delsert_herve] => [duport_denis] => [lamay_lucie] => [roesch_sandrine] => [walch_olivier] => [benzada_boris] => [cuilhe_helene] => [mignon_flore] => [perez_stephanie] => [rameau_evelyne] => [saura_anthony] => [trocelier_odile] => [vives_laurent] => [belhache_benedicte] => [fernandes_yann] => [george_lydie] => [grassart_dominique] => [laborde_genevieve] => [maisonnier_sabine] => [perducat_odette] => [saadoddine_marie_claire] => [soreil_boniface_patricia] => [dumont_annie] => [faconnier_karine] => [floch_fabienne] => [lequitte_maryvonne] => [maugeais_stephane] => [morel_gilles] => [naudin_marie_christine] => [perdriel_claire] => [plouchard_delphine] => [riethmuller_helene] => [bachele_pascale] => [beulaygue_sophie] => [guerin_muriel] => [piraud_anne] => [tourbin_gaelle] => [bonnet_philip_brigitte] => [serre_christine] => [farnos_andre] => [feurtey_daniel] => [hebert_dominique] => [hounkanrin_armelle] => [portier_pascale] => [rande_nadine] => [aid] => 133 ) ) )

Bruno
Max_admin 10 Feb, 2018
Hi Bruno,

As per the debug, the id is 133, and you can get it using:
{var:save_data51.aid}
That code should be placed in the user session OR inside a "hidden" field named "aid" in your form.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Irate 10 Feb, 2018
Hi Max,

I have created a hidden field , Name "aid", ID "aid" and value {var:save_data51.aid} ;
I put this field after the button of the first session
That's all?

Best regards,
Bruno
Max_admin 10 Feb, 2018
Hi Bruno,

As Bob has noted, this field should be placed in the pages after the first page and after the form has already been saved, I understand that you save the form after the first page is submitted, correct ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Irate 10 Feb, 2018
This field should be placed on all the pages ?
I save the form after the first page is submitted, but may be it's a mistake?

Best regards
Bruno
Max_admin 17 Feb, 2018
Hi Bruno,

The field can be on all pages, that is fine, and you can save the form anytime you want, but the field value should be loaded with the same id after the first save so that any next save updates the existing record.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.