Hello to all - here is the thing: I have successfully implemented CF6 form load in CCv6 with all current record data but
cannot get edited data saved even though I got message that record has been saved successfully.
If form is created with CCv6 form fields, the record is saving.
Save button is the same for both forms; Read function has been called in CCv6 for both forms, fields has the same defined value; Save function is the same for both forms, defined in CCv6.
What is wrong?
Hi Elita,
The best way to use Chronoforms in Connectivity is to build the form and call the form section inside a CC form view:
{section:cf_section_name}
There is no need to call a full form unless you want to run the form "submit" event, but you can do the same thing in a CC event so there is no need to mix the 2 apps.
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi, Max, thank you for your reply. I know that. And that is exactly what I have done. I edited CF6 form - deleted all buttons, all Save and Read functions and defined all the fields with the value for each field like {var:read_submission.Submission.aid}, where rad_submission is the CCv6 Read function and Submission is Model.
Then I created an event in CCv6 for the form view and View where the CF6 form is called. So far so good - record loads with all the data inside, but EDITED DATA DOES NOT SAVE!
In comparison, with all the same, when I create the form in CCv6 with built-in fields, everything works fine.
Found my problem:
Save Data function had defined Data provider {data:Model} where Model is the Model from Read data function.
To save with CF6 form, Data provider should be {data:}
***********
So, to anybody who would like to load CF6 form in CCv6 I suggest to do following:
1. Create Read data function with Where conditions Model.id:{data:id} e.g. Submission.aid:{data:aid} in my case and Select type First matching record;
2. Create Edit event in CCv6 with Read data function, e.g. {fn:read_submission}, and Form view e.g. {view:submission_form};
3. Create Save event in CCv6 With Save data function, e.g. {fn:save_submission};
4. Create Save data function e.g. save_submission with Data provider - {data:} and Update conditions Model.id:{data:id},
e.g. Submission.aid:{data:aid}
5. Create views in CCv6 for form load Form with Save button view e.g. {view:edit_toolbar_save} and CF6 form load
{chronoform/section:cf_alias/cf_section_name}; Data provider here should be your Read data function, e.g. {var:read_submission}, and Event - Save.
6. Create Toolbar button, e.g. edit_toolbar_save with the Event Save and Submit button? checked.
7. Edit existing CF6 form by deleting all Read, Save, etc. events;
8. Add to form Hidden field with the ID (or aid if you use CF6 submissions table);
9. Edit all the data fields by adding Value - {var:read_submission.Submission.aid} where read_submission is the Read data function, Submission - Model, aid - field name.
In addition, I had PHP code to be executed with CF6 DB Save function. To get this working in CCv6, I created PHP function in CCv6 and added that function to Save Event.
P.S. Thank you, Max for the great tool you created. Hope this will help others to understand it better and save time.
hi all
I follow Elitakey instruction and i'm able to:
open CF6 form inside a form view in CC6
save data
my problem is that, when CC6 open the view, doesn't show data from database.
my form view call :
- the function
- the CF6 form view
i read data with function : fn_dettaglio_imbarcazioni (model is dettaglio_imbarcazioni)
data are filtered throw idimbarcazione
for test:
if i pass the function to a table view (test) and it works and show what i want (idimbarcazione, nomeimbarcazione, targa etc.)
for details:source data of Form view is {var:fn_dettaglio_imbarcazioni}
source data of CF section "one" is {data:}
fields inside CF6 have value : {var:fn_dettaglio_imbarcazione.dettaglio_imbarcaione.FIELD_NAME}
can you help me?
Hello gix.vax,
How do you pass the data to the form ? this can make a difference.
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
thanK you for your responsenow work, i dont'know where the problem was cause i rewrite function, model and something else
sorry i'm not useful to other people, my 2 cent could be only
control typo!
:-D