Forums

Trying to Understand what's happening

chriso0258 25 Feb, 2014
Hello,

I'm still trying to get familiar with CF5 and have a question about why something is happening.

The DB Read condition is written like this:

<?php
$barcode = $form->data['barcode']; (barcode is the form id and name of the form input)
return array( 'bi_number' => $barcode );
?>


When I type in an ID number that is in the db the debugger shows this:
Array
(
    [chronoform] => staffid
    [event] => Page2
    [barcode] => bi01d35
    [bi_number] => bi01d35
    [name] => My Name
)


If I type in a an ID number that is not in the db, the debugger shows this:

Array
(
)


It makes no difference whether I have the debugger before or after the DB Reader.

So my question is this, if the barcode entered (which is an ID number) is not in the db, why doesn't the debugger at least show the form information since that information is independent of what is in the db?

I hope this question makes some sense. I'm trying to better understand what's happening and why.

Thanks for any explanation.
Max_admin 30 Mar, 2014
Hi Chriso,

Late answer, sorry, did you manage to solve this ? do you have the latest version installed ?

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
chriso0258 30 Mar, 2014
Hello Max,

No, never figured out the why. I wrote some php code so that if the ID # is not in the db, a message comes up telling the person the ID wasn't in the db, which is what I originally wanted to do, I was just surprised at the empty array. Wasn't important so I just moved on.
Max_admin 30 Mar, 2014
Great! but I'm also not sure what would cause this empty array, please let me know if you meet the same issue again!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.