TEMA:

Click on button to go to another Breezing Form 5 años 1 mes antes #218200

  • Autor del tema
  • Richnyc30
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 57
  • Gracias recibidas: 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.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Click on button to go to another Breezing Form 5 años 1 mes antes #218213

  • marko.bosnjak
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Registered
  • Mensajes: 2222
  • Gracias recibidas: 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!

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Click on button to go to another Breezing Form 5 años 1 mes antes #218274

  • Autor del tema
  • Richnyc30
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 57
  • Gracias recibidas: 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?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Click on button to go to another Breezing Form 5 años 1 mes antes #218284

  • marko.bosnjak
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Registered
  • Mensajes: 2222
  • Gracias recibidas: 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!

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Click on button to go to another Breezing Form 8 meses 1 semana antes #274433

  • sitavs
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 30
  • Gracias recibidas: 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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Click on button to go to another Breezing Form 8 meses 1 semana antes #274446

  • Avatar de Mirec
  • Mirec
  • Fuera de línea
  • Navegador Platino
  • Navegador Platino
  • Registered
  • Mensajes: 3262
  • Gracias recibidas: 161
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

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Última Edición: Post by Mirec.
  • Página:
  • 1
  • 2
  • 3
Moderadores: ForumSupport
Tiempo de carga de la página: 0.066 segundos

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!