button element & PHP Question

jmoises

Active Member
Hello i have add a button element to my form but i didnt find a PHP core area

I need to execute a PHP code when the user click the button

can some body gide me

thank you
 
There isn?t a direct way to do what you want, that I know of - but you could try using the javascript element plugin to click the ?Save? or ?Apply? button when your button is clicked - to essentially submit the form.

(That depends on what you want to do after the php code is run - If your button's ?onClick? javscript event clicks ?Apply?, then the form is submitted and you stay on the same page. If it clicks ?Save?, the form is submitted and you return to the list view.)

To get your PHP code into the mix ? Use the form?s PHP plugin (code which gets triggered on submit of the form).
http://fabrikar.com/forums/index.php?wiki/php-form-plugin/

As part of your button?s javascript ?onClick? event you?ll also need to add some code that will change the value of either the Submit or Apply button (depending on which one you decide to use to trigger the form submission from your button) ? and then in your PHP code you should check for the value of that ?normal? submit button so that if it has been changed from the default, then you know it was your button that triggered the form submission. If so, run your php code.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top