I create form with two text fields and one button "Save".
I want to do:
1. When form is opened fill this two text fields with text from two сorresponding fields of MySQL's table.
2. When I change text in this form's fields and press button "Save" new text must be written in MySQL.
Is it possible with CC6?
Thank you in advance for any help.
I want to do:
1. When form is opened fill this two text fields with text from two сorresponding fields of MySQL's table.
2. When I change text in this form's fields and press button "Save" new text must be written in MySQL.
Is it possible with CC6?
Thank you in advance for any help.
Yes it is possible by action Read Data and Save Data Action in Setup tab.
Thank you for answer.
I try to read "Chronoforms start guide" and "FAQs" but didn't find info about how to realease my task.
Can u explane me what should I do step by step?
Or where can I read about it?
I try to read "Chronoforms start guide" and "FAQs" but didn't find info about how to realease my task.
Can u explane me what should I do step by step?
Or where can I read about it?
Ok.
1. In Designer I created page with two text fields.
2. In Setup I created Read Data for read data from MySQL.
In Debug section I see that data was read correct from DB.
What should I write in Text Field's value to show data retrieved from MySQL?
Didn't find any info. 😟
1. In Designer I created page with two text fields.
2. In Setup I created Read Data for read data from MySQL.
In Debug section I see that data was read correct from DB.
What should I write in Text Field's value to show data retrieved from MySQL?
Didn't find any info. 😟
Hi Twickbot,
The read data should be above the "display section", and most probably you want to read one record only and so the read data should be configured to read the first matching record.
Now you can use this in the "Value" setting of your field:
Best regards,
Max
The read data should be above the "display section", and most probably you want to read one record only and so the read data should be configured to read the first matching record.
Now you can use this in the "Value" setting of your field:
{var:read_data_name.Model.table_field}
Best regards,
Max
Many thanks!
It worked!
One more question:
I change the value in this field.
What should I prescribe in the settings of the "Save" button so that the new value will save in the database?
It worked!
One more question:
I change the value in this field.
What should I prescribe in the settings of the "Save" button so that the new value will save in the database?
Hi Twickbot,
How do you have the "Save data" action configured ?
Best regards,
Max
How do you have the "Save data" action configured ?
Best regards,
Max
The Save data action will save the form data assuming that a table is selected and the "data provider" is set to {data:} and that the table fields names match the form fields names.
Best regards,
Max
Best regards,
Max
In "Setup" => "submit" tab I added "Save Data" then:
- "Model name" - write name.
- "Database table" - select table.
- "Data provider" - {data:}.
- "Write action" - Update
- "Update conditions" - cms_id:{user:id}
But when I change data and press "Save" button on page data is not written to the database.
What am I doing wrong?
- "Model name" - write name.
- "Database table" - select table.
- "Data provider" - {data:}.
- "Write action" - Update
- "Update conditions" - cms_id:{user:id}
But when I change data and press "Save" button on page data is not written to the database.
What am I doing wrong?
This topic is locked and no more replies can be posted.