Custom Element

ZahidFayaz 28 Feb, 2012
Hello

I want to know how to use custom element in chrono form v4

Thanks
GreyHead 28 Feb, 2012
Hi ZahidFayaz,

Please explain a bit more . . .

Bob
ZahidFayaz 28 Feb, 2012
Hello bob

Actually i am using chronoform v4 but i am unable to understand what are the benefits & how to use custom element field in form

Please explain!!!

Thanks
GreyHead 28 Feb, 2012
Hi ZahidFayaz,

Yu can use it when you need to add code PHP and or HTML that isn't available from the other elements. For example you might want to include a special image button in your form; or a custom file uploader. Things like that. You will know when you need it.

Bob
jack19 19 Mar, 2012
Hi Bob, Hi all,
I've a multipage form and in the last page I inserted this code in custom element:
<?php 
$Iban = $form->data['IbanPag'] ;
$CodPaese = substr($Iban, 0 , 2) ;
echo "<input type=\"text\"  value=\"$CodPaese\" name=\"CodicePaesePag\" />";
?>

the
$form->data['IbanPag']
is from previous page, but don't work, any idea?
Regards.
Gioacchino
GreyHead 20 Mar, 2012
Hi jack19,

Use the 'Data to Session' action in the On Submit event of the previous step and the 'Session to Data' action in the On Load event of this step to carry the data forward. Note that you must set the same Session Key for both actions for this to work correctly.

Bob
jack19 20 Mar, 2012
Hi Bob,
Don't work.
If I use the html coding {IbanPag} appears too without Session to Data and Data to Session (but displays the data in DB).
If I use the php code
$form->data['IbanPag']
does not work.😢
jack19 20 Mar, 2012
This problem occurs when I am in edit mode of the form.
I do not know if it is in insert mode, but I think so.

Gioacchino
GreyHead 21 Mar, 2012
Hi Gioacchino,

I'm sorry the tranalstaion makes this hard to understand.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

Bob
jack19 21 Mar, 2012

Hi Gioacchino,

I'm sorry the tranalstaion makes this hard to understand.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

Bob


Hi Bob,
I'm sorry for my bad English.
I found this solution:
<?php 
$Iban = $_REQUEST['IbanPag'] ;
$CodPaese = substr($Iban, 0 , 2) ;
echo "<input type=\"hidden\"  value=".$CodPaese." name=\"CodicePaesePag\" />";
?>

and work, no Data to Session and Session to Data.
Gioacchino
This topic is locked and no more replies can be posted.