Re: Digest for php-form-builder-class-developer@googlegroups.com - 2 Messages in 1 Topic

3 views
Skip to first unread message

Ben Eben

unread,
Dec 29, 2013, 1:03:52 AM12/29/13
to php-form-builder...@googlegroups.com
On the multiple buttons on the PFBC form issue, this how I've got mine working:

I define my main submit function with the ajaxCallback like so:

$form->configure(array(
            "preventJQueryLoad"=> 1,
            "ajax" => 1,
            "ajaxCallback" => submit_function_name_in_quotes, "view" => (etc, etc)));

And then,

function submit_function_name()
{
    document.forms[0].elements[n].onclick = function()
    {
        /*Do what you want to do with function here, and where n (above), is the order of the button on the form */

    }

}

P.S: I even get to run jQuery calls from within each button's function, if I want to.

I hope I understood the question properly, I'm fairly new to PHP forms, but this works for me.

Ben.

On 28/12/13 5:31 PM, php-form-builder...@googlegroups.com wrote:

Group: http://groups.google.com/group/php-form-builder-class-developer/topics

    php-form-bu...@googlecode.com Dec 28 02:43AM  

    Comment #2 on issue 203 by afnav...@gmail.com: Form Builder Class Submit
    Button - No Value
    http://code.google.com/p/php-form-builder-class/issues/detail?id=203
     
    Yeah that's why I was forced to create my own form class with common error
    checking. I didn't use google forms anymore. XDDDD
     
    It's okay to not disable the the submit buttons cuz we can work around it
    by giving them unique names within the same page so it wouldn't be a
    problem. I don't know why they did that. I would have used google forms
    over my latest project but because of this I stopped. I hope google would
    resolve this one.
     
    IMO, I think it would have been better if we include 1 file only in a
    project so that I don't have to do more things other than including 1 class
    file.
     
    For example: it would have been better if it looks like this.
     
    include "1class_file_for_a_form_class.php";
     
    $form = new form();
    $form->function_blah_blah(); //something like that... just saying :D
     
     
     
    --
    You received this message because this project is configured to send all
    issue notifications to this address.
    You may adjust your notification preferences at:
    https://code.google.com/hosting/settings

     

--
You received this message because you are subscribed to the Google Groups "php-form-builder-class developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-form-builder-class...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages