Hello,
I'd like to Export form data to a XLS file and to save it on the server (I'd like to export all the fields).
To do this I've used the 'XLS Export' option in Data Management, but I don't understand the 'Data Path' field. What should I put here?
Thanks.
I'd like to Export form data to a XLS file and to save it on the server (I'd like to export all the fields).
To do this I've used the 'XLS Export' option in Data Management, but I don't understand the 'Data Path' field. What should I put here?
Thanks.
Hi innova,
The Data Path matches up with the Model ID in a DB Read action - it lets you select part of the available data to export. Actually if specifies the contents of a sub-array to the $form->data array e.g. $form->data['data_path']
Bob
The Data Path matches up with the Model ID in a DB Read action - it lets you select part of the available data to export. Actually if specifies the contents of a sub-array to the $form->data array e.g. $form->data['data_path']
Bob
Hello Bob
How can I find out the Model ID? The debugger shows this:
Problem: The submitted form data is not in the excel file.
What do I have to enter into the "data path" field?
Thak you very much.
Patrick
How can I find out the Model ID? The debugger shows this:
Array
(
[option] => com_chronoforms5
[chronoform] => Kontaktformular
[event] => submit
[name] => nbbnbnbnn
[email] =>
[mitteilung] =>
[input_submit_3] => Abschicken
[ip_address] => xxx..xxx.xxx.xxx.
)
Problem: The submitted form data is not in the excel file.
What do I have to enter into the "data path" field?
Thak you very much.
Patrick
Hi Patrick,
In this case you can leave it empty, if it does not work then your form fields names should be changed to Model[field]
Best regards,
Max
In this case you can leave it empty, if it does not work then your form fields names should be changed to Model[field]
Best regards,
Max
Hi Max
I now did leave the field empty and changed the form fields names to Model[field].
That did the trick!
Thank you very much!
Best regards
Patrick
I now did leave the field empty and changed the form fields names to Model[field].
That did the trick!
Thank you very much!
Best regards
Patrick
Hi Patrick,
it depends on what you are doing but you normally enter "Model" in the data path when you set the fields names to "Model[field]".
Best regards,
Max
it depends on what you are doing but you normally enter "Model" in the data path when you set the fields names to "Model[field]".
Best regards,
Max
Hi Max
Everything is working fine, just some custom code is not working anymore.
The form fields now are named Model[field].
I use some custom code to display a message after the form is submitted:
Now the variable $name is empty all the time.
The form field is named "Model[name]" before it was just "name".
How must I change
I did try
Thanks a lot!
Best regards
Patrick
Everything is working fine, just some custom code is not working anymore.
The form fields now are named Model[field].
I use some custom code to display a message after the form is submitted:
$name = $form->data['name'];
if($name == "a") {
echo "a";
}
else {
echo "b";
}
Now the variable $name is empty all the time.
The form field is named "Model[name]" before it was just "name".
How must I change
$form->data['name']
?
I did try
$form->data['Model.name']
but it's not working.
Thanks a lot!
Best regards
Patrick
Hi Patrick,
You will need to use $form->data["Model"]["field"]
Best regards,
Max
You will need to use $form->data["Model"]["field"]
Best regards,
Max
"In this case you can leave it empty, if it does not work then your form fields names should be changed to Model[field]"
Works fine for text fields and drop down menus. But it's not working for Checkbox Group:
Model[nameofgroup] doesn't work (no data in email, XLS, and database).
What do I have to enter for Field Name?
Thank you very much!
Regards
Patrick
Works fine for text fields and drop down menus. But it's not working for Checkbox Group:
Model[nameofgroup] doesn't work (no data in email, XLS, and database).
What do I have to enter for Field Name?
Thank you very much!
Regards
Patrick
Hi Patrick,
The checkbox group posts an array of values, so you will need this:
Best regards,
Max
The checkbox group posts an array of values, so you will need this:
implode(",", $form->data["Model"]["field"]);
Best regards,
Max
This topic is locked and no more replies can be posted.