prefill fields with db record loader

celevt 21 Apr, 2014
Hi,

I need to prefill fields on a form using master data in a table. DB Record loader fetches the data. Update a field on the form using php seem to work but the field is displayed empty.

a_evenement is updated with a value from the database table using custom code:
<?php 
$form->data['a_evenement']= $form->data['CelevtEvenement']['a_evenement'];
?>


This code seems to work fine according to the debugger output, however the field is displayed empty. Any ideas? I would expect a_evenement to be prefilled with "Masterclass Dupo"?

Debugger:
Array
(
    [option] => com_chronoforms
    [chronoform] => mcpo-Copy
    [a_code] => madu
    [Itemid] => 
    [CelevtEvenement] => Array
        (
            [cf_id] => 1
            [a_code] => MADU
            [a_evenement] => Masterclass Duplo
            [a_datum] => 2999-01-01 00:00:00
            [a_prijs] => 99
        )

    [a_evenement] => Masterclass Duplo
)
celevt 21 Apr, 2014
I'am using db record loader which is a single record loader πŸ˜€ πŸ™„ πŸ˜‰
GreyHead 22 Apr, 2014
Hi celevt,

I don't see any reason why that doesn't work. Please post a link to the form so I can take a quick look.

Bob
This topic is locked and no more replies can be posted.