Hi, I create a table to save my form data, but I've one custom field that not appear in field list of table. Is it possible to save custom field?
Thanks in advance
Thanks in advance
I created a form and the data entered is stored in a table.
One of the fields of my form is "Custom Element" and this field will not appear in the attributes of the database table. Why?
The "Custom Element" are not stored?
I also tried to add it by hand when creating the table associated with the form, but the data still are not stored.
How can I fix it?
Thanks again
One of the fields of my form is "Custom Element" and this field will not appear in the attributes of the database table. Why?
The "Custom Element" are not stored?
I also tried to add it by hand when creating the table associated with the form, but the data still are not stored.
How can I fix it?
Thanks again
Hi lifecolor,
Provided that your custom element is valid HTML and there is a column name in the database table with the same name then the value should save OK.
Bob
Provided that your custom element is valid HTML and there is a column name in the database table with the same name then the value should save OK.
Bob
Hi Bob,
In Custom element I put this line:
<?php echo $_SESSION['title']; ?>
and I can see the correct title in front-end, but if I'm going to Create table the field do not appear, and if I add manually with the same name (registrazione) when I compile the form the field on label is empty.
You can see here:
http://demo.lifecolor.eu/advancedcongressi/index.php?option=com_chronoforms&view=form&Itemid=581&articoloid=48
Thank you again!
In Custom element I put this line:
<?php echo $_SESSION['title']; ?>
and I can see the correct title in front-end, but if I'm going to Create table the field do not appear, and if I add manually with the same name (registrazione) when I compile the form the field on label is empty.
You can see here:
http://demo.lifecolor.eu/advancedcongressi/index.php?option=com_chronoforms&view=form&Itemid=581&articoloid=48
Thank you again!
Hi lifecolor,
I don't understand what you are trying to do here. How does the session variable link to the form?
Bob
I don't understand what you are trying to do here. How does the session variable link to the form?
Bob
Is assigned a value previously and then shown in the Custom element, as shown in the link under "Registrazione a:"
I can give you admin access in PM, if you want
Thanks Bob
I can give you admin access in PM, if you want
Thanks Bob
Hi Lifecolor,
ChronoForms doesn't automatically read data from the $_SESSION array. You need to re-load it into the $form->data array (where the ChronoForms data is stored). Or use PHP to display the value directly from the $_SESSION setting.
Bob
ChronoForms doesn't automatically read data from the $_SESSION array. You need to re-load it into the $form->data array (where the ChronoForms data is stored). Or use PHP to display the value directly from the $_SESSION setting.
Bob
But I use PHP to display the value of session:
<?php echo $_SESSION['title']; ?>
But this is not enough to store in the table, right?
<?php echo $_SESSION['title']; ?>
But this is not enough to store in the table, right?
Hi lifecolor,
No that has no connection to ChronoForms, please see my last post.
Bob
No that has no connection to ChronoForms, please see my last post.
Bob
Hi Bob, ok sorry but, how do I re-load into the $form->data array?
Is there a manual?
But I create a table again and if a put a simple string on custom element like "Hello", the field is not added in the table anyway.
Thanks
Is there a manual?
But I create a table again and if a put a simple string on custom element like "Hello", the field is not added in the table anyway.
Thanks
Hi,
Assuming your table has a column named "X" and you want to store "Hello" in that column, you should add a custom code action and include this code:
The custom code action should be before the "db save" action.
regards,
Max
Assuming your table has a column named "X" and you want to store "Hello" in that column, you should add a custom code action and include this code:
<?php
$form->data["X"] = "Hello";
The custom code action should be before the "db save" action.
regards,
Max
This topic is locked and no more replies can be posted.