Hi Everyone,
I'm passed out with an issue i'have to faced, let me first present the context, and what i want to do.
I wish to make a student plateform to do survey and share job opportunities for graduated that have a work position.
The workflow will be as followed
1) the administrator (teacher) fill the data base with CSV fille. (The UUID is autogenerate from mysql trigger function NEW.UUID)
[attachment=0]db.PNG[/attachment]
2) a mail is send to each member 'MAIL' with a link containing the 'UUID',
The link will have this form :
'Joomla_site'/index.php?option=com_chronoforms5&chronoform='form name'&token=5500f6e8-5263-11e6-85bd-fa163efc.
3) when cliking the link, user will be redirected to the form that show form field pre-filled from database .
[attachment=1]form designer.PNG[/attachment]
4) user will update some value (new job or new position)
5) submit button upload the db with new value.
curently form works to enter new value.
Now I have create a db read (on load and before render)
with following code in parameter.
When executing the url with the following token '5500f6e8-5263-11e6-85bd-fa163efc' as option, the debugger can read db and return me following result.
Data array:
Errors:
Debug Infos
So now i'm blocked, and have 2 questions:
[list]Is the actually process, right ? (I want to get all data comming from user with specific UUID).
How to fill my form fields with these values as default?[/list]
Thanks a lot for your time and knowledge
I'm passed out with an issue i'have to faced, let me first present the context, and what i want to do.
I wish to make a student plateform to do survey and share job opportunities for graduated that have a work position.
The workflow will be as followed
1) the administrator (teacher) fill the data base with CSV fille. (The UUID is autogenerate from mysql trigger function NEW.UUID)
[attachment=0]db.PNG[/attachment]
2) a mail is send to each member 'MAIL' with a link containing the 'UUID',
The link will have this form :
'Joomla_site'/index.php?option=com_chronoforms5&chronoform='form name'&token=5500f6e8-5263-11e6-85bd-fa163efc.
3) when cliking the link, user will be redirected to the form that show form field pre-filled from database .
[attachment=1]form designer.PNG[/attachment]
4) user will update some value (new job or new position)
5) submit button upload the db with new value.
curently form works to enter new value.
Now I have create a db read (on load and before render)
with following code in parameter.
<?php
$menu_id = JRequest::getVar('Itemid');
include (JPATH_SITE.'/components/com_chronoforms5/includes/menu_ids.php');
$form->data['token']= $menu_ids[$menu_id];
return array('UUID' => '$menu_ids[$menu_id]);
?>
When executing the url with the following token '5500f6e8-5263-11e6-85bd-fa163efc' as option, the debugger can read db and return me following result.
Data array:
Array
(
[option] => com_chronoforms5
[chronoform] => suivi1
[token] => 5500f6e8-5263-11e6-85bd-fa163efc
[Data2] => Array
(
[0] => Array
(
[ID] => 1
[UUID] => 567fe140-5260-11e6-85bd-fa163efc
[UPDATED] => 2016-07-25 14:07:33
[NOM] => Monnom
[PRENOM] => monprenom
[MAIL] => monmail@gmail.com
[DATE_NAISSANCE] => 2016-01-03
[dropdown] => NA
)
[1] => Array
(
[ID] => 2
[UUID] => 5500f6e8-5263-11e6-85bd-fa163efc //this is the token passed as parameter
[UPDATED] => 0000-00-00 00:00:00
[NOM] => PEREME
[PRENOM] => Florian
[MAIL] =>
[DATE_NAISSANCE] => 2010-05-19
[dropdown] => liste2
)
[2] => Array
(
[ID] => 3
[UUID] => 91c7f33a-5263-11e6-85bd-fa163efc
[UPDATED] => 0000-00-00 00:00:00
[NOM] => Dupont
[PRENOM] => jacque
[MAIL] => jcdupont@gmail.com
[DATE_NAISSANCE] => 2012-08-29
[dropdown] => liste3
)
[3] => Array
(
[ID] => 4
[UUID] => d42bb2bf-5263-11e6-85bd-fa163efc
[UPDATED] => 0000-00-00 00:00:00
[NOM] => Dupont
[PRENOM] => jacque
[MAIL] => jcdupont@gmail.com
[DATE_NAISSANCE] => 2012-08-29
[dropdown] => liste3
)
)
)
Array
(
)
Errors:
Array
(
)
Debug Infos
Array
(
[2] => Array
(
[DB Read] => Array
(
[Queries] => Array
(
[0] => SELECT `Data2`.`ID` AS `Data2.ID`, `Data2`.`UUID` AS `Data2.UUID`, `Data2`.`UPDATED` AS `Data2.UPDATED`, `Data2`.`NOM` AS `Data2.NOM`, `Data2`.`PRENOM` AS `Data2.PRENOM`, `Data2`.`MAIL` AS `Data2.MAIL`, `Data2`.`DATE_NAISSANCE` AS `Data2.DATE_NAISSANCE`, `Data2`.`dropdown` AS `Data2.dropdown` FROM `suivi` AS `Data2`
)
)
)
)
.
So now i'm blocked, and have 2 questions:
[list]Is the actually process, right ? (I want to get all data comming from user with specific UUID).
How to fill my form fields with these values as default?[/list]
Thanks a lot for your time and knowledge