wuschel_lux
Member
Hi all,
are php validation rules acting the same if used in an "element" or "form"?
I have personalised generated link:
https://url.me/evaluation?tab_form___my_hash=9EZlf6Z8EcOAGSJ&tab_form___course=48
send out to the participant.
The system now needs to check if the Hash is in a table and the evaluation form is still open. Both info are found in an SQL table.
I tried this code:
When trying to go to the next tab in the form, the validation is hanging and an error is shown:
[Error] Failed to load resource: the server responded with a status of 500 () (index.php, line 0)
https://url.me/index.php?option=com_fabrik&format=raw&task=form.ajax_validate&form_id=9 simular to this issue:
https://fabrikar.com/forums/index.p...running-in-validation-loop.53779/#post-281162
Now is this the same problem, or is my php code maybe wrong.
Hope someone can help me out. Thanks
are php validation rules acting the same if used in an "element" or "form"?
I have personalised generated link:
https://url.me/evaluation?tab_form___my_hash=9EZlf6Z8EcOAGSJ&tab_form___course=48
send out to the participant.
The system now needs to check if the Hash is in a table and the evaluation form is still open. Both info are found in an SQL table.
I tried this code:
PHP:
$mydatabase = JFactory::getDBO();
// values from this form
$coursID = $this->data['tab_form___course_raw'];
$myHash = $this->data['tab_form___my_hash'];
// value from other table
$sql = "
SELECT *
FROM evaluation_buffer
WHERE id = '$coursID'
";
$mydatabase->setQuery( $sql );
$rows = $mydatabase->loadObjectList();
foreach ( $rows as $row ){
$myHash_buffer = $row->my_hash;
}
// check if both hash values are equal
if($myHash_buffer == $myHash){retun 'true';} else retun 'false';
When trying to go to the next tab in the form, the validation is hanging and an error is shown:
[Error] Failed to load resource: the server responded with a status of 500 () (index.php, line 0)
https://url.me/index.php?option=com_fabrik&format=raw&task=form.ajax_validate&form_id=9 simular to this issue:
https://fabrikar.com/forums/index.p...running-in-validation-loop.53779/#post-281162
Now is this the same problem, or is my php code maybe wrong.
Hope someone can help me out. Thanks