Hello, have a question - stuck with the following dilemma:
HOW to use one form and one Event for two actions - add new record and edit existing record?
I can either add new or edit existing record😟
My steps so far:
1) Created {fn:read_submission} with condition Submission.aid={data:aid}
2) created CF6 form with
4) created link that edits existing record - submission_edit_link with Event "edit"; URL and/or URL parameters - aid={var:submissions_list.row.Submission.aid}
5) created edit event with
7) created save event with
And result is as follows:
1. when I put Update condition Submission.aid={data:aid} Edit record works/ Save new record - does not;
2. If I delete that Update condition, I am able to save New record and get duplicated record on edit;
What have I missed here?
Thank you in advance-
Elita
HOW to use one form and one Event for two actions - add new record and edit existing record?
I can either add new or edit existing record😟
My steps so far:
1) Created {fn:read_submission} with condition Submission.aid={data:aid}
2) created CF6 form with
- Hidden field - aid
- defined field names so all they have one Model - Submission[Name];
- added field Value - {var:read_submission.Submission.Name}
4) created link that edits existing record - submission_edit_link with Event "edit"; URL and/or URL parameters - aid={var:submissions_list.row.Submission.aid}
5) created edit event with
- {fn:read_submission}
- {view:submission_form} - this call CF6 with {chronoform/section:juridiskas-labot/load} and save Toolbar button [ step 8) ]
7) created save event with
- {fn:save_submission}
- {redirect:index}
And result is as follows:
1. when I put Update condition Submission.aid={data:aid} Edit record works/ Save new record - does not;
2. If I delete that Update condition, I am able to save New record and get duplicated record on edit;
What have I missed here?
Thank you in advance-
Elita