The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Confirm New Submission - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Confirm New Submission (/showthread.php?tid=2955) |
Confirm New Submission - grahame - Mar 13th, 2014 Hi Can I get a pointer on this please? When doing an Add submission, I want to prompt the user with the usual are you sure? I can see where a hook is needed, ft_create_balnk_submission, but still a bit baffled? I thought I would replicate/amend delete_form.php process but I cannot find the source for delete_form.tpl to save my life? Where are the .tpls please? Confirm New Submission - grahame - Mar 14th, 2014 Ah.. OK have found the .tpl file… /public_html/formtools/themes/default/admin/forms But, actually I realised that there is an even better example of a confirmation …. when deleting a submission… so I am desperately trying to figure out how Formtools all fits together. Can I ask where the source code is for the ft_create_blank_submission is please? And now I have found them too… /public_html/formtools/global/code P.S. I'm adding them in these threads so I can look them up later if I need my memory jogging! Nope… I just cannot see how you push out a confirmation message (and trap the response) when deleting a submission? Need some help on this please…. thanks RE: Confirm New Submission - grahame - Mar 17th, 2014 Hi Still trying to figure out how to add a confirm message when adding a submission. By way of experiment, I tried to 'copy' the delete submission on the edit submission page whereby I copied the Delete button in edit_submission.tpl and replaced existing Add button with Code: <input type="button" name=“add” value="{$LANG.word_delete}" class=“red” onclick="return add_submission({$submission_id}, 'submissions.php')"/> I then copied the delete_submission js code in manage_submissions.js and changed it to Code: /** but I click my new Add button.... absolutely nothing happens... not even Hello World.... I'm a developer but not on Web pages so I could really do with some pointers please? RE: Confirm New Submission - grahame - Mar 24th, 2014 Hi Just to finish this thread off. For the sake of consistency (in user experience) I was hoping to use the same 'pop-up' as used in the delete submission confirmation. Sadly this turned out to be far too complex for me! Instead, I have built a confirmation using the 'old-fashioned' way by inserting a new 'confirmation' page a la delete-form. Works OK but not as elegant as I would have liked. If you build one of these, watch out because the new submission process for Admin and Client users are slightly different. The former uses submissions.php whereas the latter uses index.php. |