The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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:
/**
* Called on the edit submission page; lets a user add a new submission.
*
* @param integer submission_id
* @param string target_webpage where to link to after adding the submission
*/
ms.add_submission = function(submission_id, target_webpage) {
document.write("Hello World!");
ft.create_dialog({
    dialog:    ft.check_url_dialog,
    title:     g.messages["phrase_please_confirm"],
    content:   g.messages["confirm_delete_submission"],
    popup_type: "warning",
    buttons: [{
      text: g.messages["word_yes"],
      click: function() {
        window.location = target_webpage + “?add_submission=“ + submission_id;
      }
    },
    {
      text: g.messages["word_no"],
      click: function() {
        $(this).dialog("close");
      }
    }]
  });

  return false;
}

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.