ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

XLS Export option and 'data path' field

innova 03 Jul, 2015
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.
GreyHead 04 Jul, 2015
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
pat01 21 Feb, 2017
Hello Bob

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
Max_admin 21 Feb, 2017
1 Likes
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
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
pat01 21 Feb, 2017
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
Max_admin 21 Feb, 2017
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
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
pat01 22 Feb, 2017
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:

$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
Max_admin 22 Feb, 2017
1 Likes
Hi Patrick,

You will need to use $form->data["Model"]["field"]

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
pat01 22 Feb, 2017
Hi Max

Work perfect!

Thanks a lot!

Best regards
Patrick
pat01 02 Mar, 2017
"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
Max_admin 03 Mar, 2017
Hi Patrick,

The checkbox group posts an array of values, so you will need this:
implode(",", $form->data["Model"]["field"]);
Best 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.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com