if it helps to ignore my above crappy example - can anyone point me towards an example of having a form in a modal that can submit/show errors as well as close itself when successful 'save'?
Hi Jeff,
Apologies for the delayed response I can see Sean has replied to your ticket so I know you are currently going through the linked tutorial.
Regards,
Liam
Bump! What linked tutorial? What was the answer?
OK the answer is fix your bugs, then it just works :) Target is the same modal as you popped up before.
I created a placeholder right at the top of the modal Handlebars, then referenced that as the target. It picks up nicely.
Jeff Amiel
So I have a form snippet that is 'launched' via a gs-link/button with a modal target...
<gs-link snippet="item_edit?action=view" target="modal"><button>Create New</button></gs-link>
the item_edit snippet (form) launches properly in a modal and all is well
However - I have ZERO clue what to put in the target for the <gs-form> tag so that any form errors can be re-rendered in that same modal. No matter what I try - either nothing happens - or a new modal renders on top of the old one.
Any help would be appreciated....
2 people have this question