TOPIC:

Click on button to go to another Breezing Form 4 years 7 months ago #218200

  • Topic Author
  • Richnyc30
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 57
  • Thanks: 0
I want to set up a button that lets a user, when the current form doesn't have enough detail to go to another Breezing Form.
Is the Submit button the one to use?
What is the Action code (or other script) that would save the current form and transfer to another form?
I read all I could find in the forums and I'm just as confused as ever.

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

Click on button to go to another Breezing Form 4 years 7 months ago #218213

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 280
Hello,

you could try out this solution:

1) Exclude the default submit button.

2) Create a custom submit button and name it "submit".

3) Go to the Advanced tba > Actionscript > Actions > Click > Type > Custom and paste this code in the framework:
function ff_submit_action(element, action)
{
    switch (action) {
        case 'click':
    if(typeof bfUseErrorAlerts != 'undefined'){
     JQuery(".bfErrorMessage").html('');
     JQuery(".bfErrorMessage").css("display","none");
    }
    error = ff_validation(ff_currentpage);
    if (error != '') {
        if(typeof bfUseErrorAlerts == 'undefined'){
           alert(error);
        } else {
           bfShowErrors(error);
        }
        ff_validationFocus('');
    } else{
      jQuery.ajax({
          type: "POST",
          url: JQuery(element).closest("form").attr("action"),
          data: JQuery(element).closest("form").serialize(),
          success: function(data)
          {
             location.href="http://www.yahoo.com";
          }
        });}
            break;
        default:;
    }
}
NOTE: Replace www.yahoo.com with the URL address of your form.
Basically, this script will validate and submit the form. After that, it will redirect to another page.

Try and let me know if it's working for you.

Regards,
Marko
======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!

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

Click on button to go to another Breezing Form 4 years 7 months ago #218274

  • Topic Author
  • Richnyc30
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 57
  • Thanks: 0
Just to make sure: the pull-down list for type of field only shows "submit" not "custom submit" as I've seen on early documentation.
Choosing the Submit Button is really a custom submit button?

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

Click on button to go to another Breezing Form 4 years 7 months ago #218284

  • marko.bosnjak
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 2222
  • Karma: 44
  • Thanks: 280
Hello,

that's correct. We are referring to it as a custom button, because BF has a default submit button, which you can chose in form properties. The submit button from the pull-down list is the custom submit button.

Regards,
Marko
======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!

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

Click on button to go to another Breezing Form 2 months 2 weeks ago #274433

  • sitavs
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 30
  • Thanks: 0
Hi,

Could you please tell me how I can append the URL in the code to pass the value of a field to the second form?
My second form is set to receive the value, but I can't figure out how to send it, below is what I've tried, but the button fails:
function ff_btn_continue_to_cabin_form_action(element, action)
{
    var ref_id = ff_getElementByName('ref_id').value;
    switch (action) {
        case 'click':
    if(typeof bfUseErrorAlerts != 'undefined'){
     JQuery(".bfErrorMessage").html('');
     JQuery(".bfErrorMessage").css("display","none");
    }
    error = ff_validation(ff_currentpage);
    if (error != '') {
        if(typeof bfUseErrorAlerts == 'undefined'){
           alert(error);
        } else {
           bfShowErrors(error);
        }
        ff_validationFocus('');
    } else{
      jQuery.ajax({
          type: "POST",
          url: JQuery(element).closest("form").attr("action"),
          data: JQuery(element).closest("form").serialize(),
          success: function(data)
          {
             location.href="https://myurl.com/index.php?option=com_breezingforms&view=form&Itemid=547&ref_id="+ref_id+"";
          }
        });}
            break;
        default:;
    }
}

If I use a generic value instead of "+ref_id+" in the URL parameter, it is passed across and populates the field as expected.

Thanks in advance,
Simon

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

Click on button to go to another Breezing Form 2 months 2 weeks ago #274446

  • Mirec's Avatar
  • Mirec
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 2952
  • Karma: 2
  • Thanks: 150
Hi,

oke, I will create one example for you and then provide it here

Give me little time

if you have more questions, feel free to ask!

Reagrds,
Mirko

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

Last edit: Post by Mirec.
Moderators: ForumSupport
Time to create page: 0.042 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

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

Summer 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!