Dropdown redirect

estradalberto

New Member
Hello, I want to add a dropdrown element to a form, so when an option is selected it will pop-up another fabrik form or any other URL whatsoever.

I have tried javascript and other more complicated ideas seen in forums, but i haven't been succesful. Maybe it is a really simple thing but I'm missing that simplicity principle.

Thanks in advance for your response.
 
Just so I get this right: among the elements in a Fabrik form you want a dropdown menu which, on click of an option, makes the user leaving the form and land on another page?

Hmm, I haven't tried this, so this may work just fine or not at all, but if it does, then this might be the simplest way: use a display text (or calc element not saving to DB?) and build the dropdown with code borrowed from the "framework" of your Joomla template for dropdown menus. Here it is for Bootstrap 2 or Bootstrap 3 or Bootstrap 4, for example.
 
Try this:
JavaScript:
jQuery('#your_dropdown_el_id').on('change', function(){
    var selected_value = this.value;
    if(selected_value == 1){
        location.replace("https://google.com")
    }
})
 
Just so I get this right: among the elements in a Fabrik form you want a dropdown menu which, on click of an option, makes the user leaving the form and land on another page?

Hmm, I haven't tried this, so this may work just fine or not at all, but if it does, then this might be the simplest way: use a display text (or calc element not saving to DB?) and build the dropdown with code borrowed from the "framework" of your Joomla template for dropdown menus. Here it is for Bootstrap 2 or Bootstrap 3 or Bootstrap 4, for example.

Thanks mate, I will sure take a look at that.
 
Try this:
JavaScript:
jQuery('#your_dropdown_el_id').on('change', function(){
    var selected_value = this.value;
    if(selected_value == 1){
        location.replace("https://google.com")
    }
})

Thank you, this seems very easy, I'll take a look and let you know how it goes.
Cheers.
 
Just so I get this right: among the elements in a Fabrik form you want a dropdown menu which, on click of an option, makes the user leaving the form and land on another page?

Hmm, I haven't tried this, so this may work just fine or not at all, but if it does, then this might be the simplest way: use a display text (or calc element not saving to DB?) and build the dropdown with code borrowed from the "framework" of your Joomla template for dropdown menus. Here it is for Bootstrap 2 or Bootstrap 3 or Bootstrap 4, for example.

Thanks a lot. It worked as a charm.
Kudos!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top