TOPIC:

Saving a form to submit later, step by step? 7 years 10 months ago #137918

  • Topic Author
  • mwdomains
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 10
  • Thanks: 0
I am working on a project where I need the user to be able to save their progress of the form and finish it later. I have read some of the forum posts that seem to be more than to 2 years old. So the instruct doesn't really match up with what I have.
Is there a tutorial for this somewhere with Step by Step for my version? I am running Joomla 3.3 and have the latest version of the form builder. BreezingForms 1.8.5 Stable (build 864). I know the user will need to create there own account to make this happen, I am just not sure what to do with the form. Thanks in advance for any help.

Please Log in or Create an account to join the conversation.

Saving a form to submit later, step by step? 7 years 10 months ago #137921

  • pedro81's Avatar
  • pedro81
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 15273
  • Karma: 287
  • Thanks: 1077
Hi,

of course that it is possible, but you will need to use custom buttons in your pages. If you create a form and for example you add a new button in the first page called "savepage1" (The label is not important), go to it´s Advanced tab > Actionscript:
Type: click
Custom script - enter in the text area this code:
function ff_savepage1_action(element, action)
{
    switch (action) {
        case 'click':

JQuery.ajax({
          type: "POST",
          url: JQuery(element).closest("form").attr("action"),
          data: JQuery(element).closest("form").serialize(),
          success: function(data)
          {
              //alert(data); // possible pop-up confirmation
          }
        });

            break;
        default:;
    } // switch
}

Just test it in one page an d let us know if it helps.

Please Log in or Create an account to join the conversation.

Saving a form to submit later, step by step? 7 years 10 months ago #137929

  • Topic Author
  • mwdomains
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 10
  • Thanks: 0
Thanks for the quick reply. I will see if I can make it work.

Please Log in or Create an account to join the conversation.

Saving a form to submit later, step by step? 7 years 10 months ago #137966

  • Topic Author
  • mwdomains
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 10
  • Thanks: 0
Am I creating a button from Element Properties with the "Submit button" type or am I creating a custom button somewhere else.

I created the savepage1 button using your instructions above using the "submit button" type and when I click on the save button no alerts from the front end, but it seems to be saving partial data on the backend. I browse away from my form and come back but the data is not populated any more. I am getting emails to the admin every time I click the save button.

The form itself is for "registered only" users.

Sorry, I am new at this and not sure how to proceed. Thanks in advance for any help.

Please Log in or Create an account to join the conversation.

Saving a form to submit later, step by step? 7 years 10 months ago #138152

  • LeaMaria
  • Offline
  • Developer
  • Developer
  • Posts: 308
  • Karma: 7
  • Thanks: 38
Hello,

if you want to ppopulate earlier submitted data you will need to enable the "submission editable by user" option in the menuitem of your form.

Regarding the email we need a little workaround.

1. disable the standard email notification
2. create a hidden element called "finished"
3. change pedros code to:
function ff_savepage1_action(element, action)
{
    switch (action) {
        case 'click':

JQuery.ajax({
          type: "POST",
          url: JQuery(element).closest("form").attr("action"),
          data: JQuery(element).closest("form").serialize(),
          success: function(data)
          {
            ff_getElementByName('finished').value=0;
          }
        });

            break;
        default:;
    } // switch
}

4. go to Form properties->advanced->more options->Scripts->initscript->custom and check "create code framework"

between the curly brackets { } put this:

ff_getElementByName('finished').value=1;


5. go to Form properties->advanced->more options->submit pieces->custom and put the following code into the box:

$this->execPieceByName('ff_InitLib');
$finished = ff_getSubmit('finished');
$fromname = 'Your from Name'; //  /* Change to desired from name */
$recipient = 'your@email.com'; /* Change to Your Admin Email Address */

 
// Create the Body format for use in e-mail
foreach ($this->maildata as $data)
{
     if ($data[_FF_DATA_TYPE] != 'Hidden Input')
     {
          $body .= $data[_FF_DATA_TITLE].":
          ".$data[_FF_DATA_VALUE].nl();
     }
}

if($finished==1){ 
$this->sendMail($from, $fromname, $recipient, $body); // This line actually emails the form.

}

6. Now save everything and tet the form, it should work!

I hope this helps.
Regards,
Lea

===============================================
Satisfied? Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.049 seconds

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!