HashanChamara / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
0 stars 0 forks source link

Poping up a form with jquery-ui #131

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have some popups using jqueryUI dialogs with a form within them. For some 
reason the dialog won't popup when I click in a link that calls 
dialog(open) if the forms are created with php-form-builder-class

Original issue reported on code.google.com by marcelo7...@gmail.com on 3 May 2011 at 7:44

GoogleCodeExporter commented 8 years ago
What version of the project are you using?  Can you provide a link to your 
webpage?

- Andrew

Original comment by ajporterfield@gmail.com on 3 May 2011 at 8:09

GoogleCodeExporter commented 8 years ago
Thanks for answering Andrew
I am using Version 1.1.4 but I still working locally. I attach an example file

Original comment by marcelo7...@gmail.com on 3 May 2011 at 9:50

Attachments:

GoogleCodeExporter commented 8 years ago
While I have no doubt that you could eventually make version 1.x work in your 
scenario, I would highly recommend using the newly published PFBC 2.0 - 
http://php-form-builder-class.googlecode.com/files/pfbc2.0-php5.3.zip.  Below 
is a code snippet that you can use to replace the contents your getForm 
function.

include("include/PFBC/Form.php")
$form = new PFBC\Form("HelloWorld", 400);
$form->configure(array(
   "prevent" => array("jQuery", "jQueryUI")
));
$form->addElement(new PFBC\Element\Textbox("My Textbox:", "MyTextbox", array(
   "value" => "Hello World"
)));
$form->addElement(new PFBC\Element\Button);
return $form->render(true);

I included the prevent property in the form's configure method b/c I see you're 
already including jQuery and jQueryUI.  This will prevent it from being 
included multiple times.

Give that a try and let me know if that works out any better for you.

- Andrew

Original comment by ajporterfield@gmail.com on 4 May 2011 at 1:19

GoogleCodeExporter commented 8 years ago
Thanks Andrew!! It worked!
The problem was solve with the "prevent" property. Thanks again!

Original comment by marcelo7...@gmail.com on 7 May 2011 at 7:49

GoogleCodeExporter commented 8 years ago

Original comment by ajporterfield@gmail.com on 14 May 2011 at 3:18