Button elements in a form

rdiana

Member
Dear friends,
I'd like to assemble a form with some buttons, each of them with a different function. To this purpose, I'd like to use the button element plugin and not the default buttons (apply, save...).
Here my questions:

1. I'd like to associate the execution of a php code (e.g. to launch a query in the database) on the click of a button: where can I write the php code in the button-plugin?
2. let's suppose we have two or more buttons in the form: how can I distinguish, in the php code, which of them has been pressed?

Cheers,
Roberto
 
You'll need to use the 'user ajax' method. See ./components/com_fabrik/user_ajax_example.php for details.

To distinguish between buttons, you'd probably just provide an argument to your userAjax call which you would set in the JS function that calls the AJAX.

-- hugh
 
Dear Hugh,
thank you for your suggestion, I'll try this approch soon.
Another question: can I attach a css file to change the button behaviour (hover, active...)? How could I do?

Best regards,

Roberto
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top