TOPIC:

Getting value of custom buttons 2 weeks 1 day ago #245821

  • Topic Author
  • deeplogica
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 42
  • Thanks: 0
Hi
I have created two buttons on my form - one to accept the quote and one to request more info.

The record gets saved without any problem, however the value of which button is clicked is not. Do I have to do anything special to store which button is clicked?

thanks

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

Getting value of custom buttons 2 weeks 1 day ago #245844

  • tihana.krivic's Avatar
  • tihana.krivic
  • Away
  • Moderator
  • Moderator
  • Posts: 636
  • Karma: 3
  • Thanks: 75
Hi,

for this you can put a custom action on each button and fill a hidden input to determine what button has been clicked.
To do so:
-add hidden input to your form
-go to each button's -> Advanced->Action script->check Custom->check "Click"->Create code framework and put this for example for button1:
function ff_NAMEOFBUTTON_action(element, action)
{
    switch (action) {
        case 'click':
             ff_getElementByName("NAMEOFHIDDEN-INPUT").value = "Button1 Clicked";
             ff_validate_submit();
            break;
        default:;
    } // switch
} // ff_NAMEOFBUTTON_action

This goes for the button2 button, where you would say "Button2 Clicked".

Please replace NAMEOFBUTTON with name of your button (not title), and
NAMEOFHIDDENINPUT with name of hidden input (not title).

Let me know if you need more help.


Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Getting value of custom buttons 2 weeks 1 day ago #245845

  • Topic Author
  • deeplogica
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 42
  • Thanks: 0
Hi
Yes thanks, thats in fact exactly what I have just done and it works fine

Cheers

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

  • Page:
  • 1
Time to create page: 0.048 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

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!