How to creat new Field with sample code

711 views
Skip to first unread message

Prabhu ST

unread,
Aug 1, 2012, 6:40:24 AM8/1/12
to jquery-form-b...@googlegroups.com
Hi,

          Is there any body give me your sample code with added new field like check box, combo box any other field in JQuery Form Builder Plugin and also tell me how to add new field. Am new in JQuery. Pls help me

Thanks,
PrabhuST

Chee Kin Lim

unread,
Aug 1, 2012, 10:40:22 AM8/1/12
to jquery-form-b...@googlegroups.com
Hi there,

Thanks for your interest to the plugin.

Please the guide at http://code.google.com/p/jquery-form-builder-plugin/wiki/HowToCreateNewField

Existing "Single Line Text" and "Plain Text" fields are very good example on how a field being created.

Hope this help.

Best regards,
Chee Kin

Prabhu ST

unread,
Aug 2, 2012, 4:51:45 AM8/2/12
to jquery-form-b...@googlegroups.com
Hi,

        Thanks for replay but I did not understanding that code please explain that code with example

Thanks,

Chee Kin Lim

unread,
Aug 2, 2012, 5:09:50 AM8/2/12
to jquery-form-b...@googlegroups.com
Sorry for lack of detail documentation about the code, may I know which section you don't understand?

Have you write any JQuery plugin? If you don't, I think you need to learn how to write a JQuery plugin first. Each field is a JQuery plugin by itself, it was design for extensibility and modularity in mind.


Hope this help.

Best regards,
Chee Kin




vzmind

unread,
Aug 2, 2012, 5:31:34 AM8/2/12
to jquery-form-b...@googlegroups.com
Hi Prabhu,

Dont expect more from the creator. He did a good job publishing the plugin and the documentation but doesnt actively support the community using the plugin.

Anyway to create for example a select box, you have to create a new file, jquery.formbuilder.select.js into your form-builder folder. You can find mine attached as an example. This new field type must then be registered at the beginning of your jquery.formbuilder.core.js file:

15 var FormBuilder = {
 16   options: { // default options. values are stored in prototype
 17     fields: 'PlainText, SingleLineText, Textarea, Select, Checkbox, HiddenText, DateField, Email',
 18     tabSelected: 0,
 19     readOnly: false,
 20     tabDisabled: [1],
 21     formCounter: 1,
 22     language: 'en',
 23   ..........

Hope that help. It's really specific to our usage and has been adapted to match our needs. So read it carefully. I would have prefer to have a better API to avoid rewriting each field definition in a separate file but had no time to re-write that properly. If you want to study the usage we did of that plugin, register on formstorm.co and check the form builder. You'll need a Salesforce account (free dev account is enough).

---
Cheers,
Vz

2012/8/2 Prabhu ST <praph...@gmail.com>
jquery.formbuilder.select.js

Chee Kin Lim

unread,
Aug 2, 2012, 11:25:17 PM8/2/12
to jquery-form-b...@googlegroups.com
Hi Vz,

Thanks for writing.

Good to find out that formstorm.co is using my plugin. I try my best to support the community using the plugin as it is only one of the many open source projects I published.

When you guys check about the discussion forum, neither the community is actively asking question or help to answer question. I think you are the first one, many thanks.

If you guys can contribute back the improvement you made to the plugin's code base, I will be greatly appreciated. I believe it help other users of the plugin too. (So far no contribution from other developers).

I have some ideas to improve the code and documentation, just that it is not in my priority at the moment.

I hope you guys understand.

Best regards,
Chee Kin 

Prabhu ST

unread,
Aug 3, 2012, 6:27:39 AM8/3/12
to jquery-form-b...@googlegroups.com, vzm...@gmail.com
Hi vzmind,

   Thanks for your replay. I got your code. But I need full code from this


var FormBuilder = {
 16   options: { // default options. values are stored in prototype
 17     fields: 'PlainText, SingleLineText, Textarea, Select, Checkbox, HiddenText, DateField, Email',
 18     tabSelected: 0,
 19     readOnly: false,
 20     tabDisabled: [1],
 21     formCounter: 1,
 22     language: 'en',
 23   ..........

don't mistake me am new to plugin development so please help me. I have register on formstorm.co but there is no form builder. so how can I find that on formstorm.co.

Prabhu ST

unread,
Aug 3, 2012, 6:34:42 AM8/3/12
to jquery-form-b...@googlegroups.com
Hi ,

         Thanks for your replay. Am new to JQuery Plugin development. I haven't write any JQuery Plugin. If you know any other best material please send me that link to me. I will learn the Plugin development. So pls help me.

Thanks,
Prabhu 

Chee Kin Lim

unread,
Aug 3, 2012, 8:31:39 AM8/3/12
to jquery-form-b...@googlegroups.com
Hi Prabhu,

Please see the last 3 links at http://www.diigo.com/user/limcheekin/jquery%20plugin


Hope this help.

Best regards,
Chee Kin


Prabhu ST

unread,
Aug 6, 2012, 1:58:00 AM8/6/12
to jquery-form-b...@googlegroups.com, vzm...@gmail.com
Hi vzmind,

          Can your give me the full source code with adding new field in FormBuilder. Pls help me don't mistake me pls help me I hope you

Thank you.

Prabhu ST

unread,
Aug 11, 2012, 7:27:50 AM8/11/12
to jquery-form-b...@googlegroups.com
Hi limcheekin,

              Your plugin is not loaded in perfectly in IE. Is there any solution to correct this error pls tell me.

Thank You,
Prabhu.ST


On Wednesday, 1 August 2012 20:10:22 UTC+5:30, limcheekin wrote:

Chee Kin Lim

unread,
Aug 11, 2012, 10:58:34 AM8/11/12
to jquery-form-b...@googlegroups.com
I unable to help you if you don't describe what loading issue in specific. I tested the plugin in IE 18 months ago, it work fine. Unluckily I can't recalled which version of IE I tested.

Best regards,
Chee Kin

Prabhu ST

unread,
Aug 18, 2012, 6:53:36 AM8/18/12
to jquery-form-b...@googlegroups.com
Hi,

          Am using IE 8 the alignment is not perfectly loaded. Pls give me the solution also attached my screen pls find my attachment

Best regards,
Prabhu
Form1.JPG
Form2.JPG
Form3.JPG
Form4.JPG

Prabhu ST

unread,
Aug 21, 2012, 5:07:36 AM8/21/12
to jquery-form-b...@googlegroups.com
Hi,

           Can you see my attachment this is my problem please give the solution

Thanks & Regards

Prabhu

On Saturday, 11 August 2012 20:28:34 UTC+5:30, limcheekin wrote:

Chee Kin Lim

unread,
Aug 22, 2012, 4:12:30 AM8/22/12
to jquery-form-b...@googlegroups.com
Hi Prabhu,

Sorry to tell you that I am kinda busy at the moment, I don't think I have time to look into the problem.

Best regards,
Chee Kin

Prabhu ST

unread,
Aug 24, 2012, 8:19:25 AM8/24/12
to jquery-form-b...@googlegroups.com

Hi,

          Thanks for your replay

Toan Pham

unread,
Dec 5, 2012, 12:09:15 PM12/5/12
to jquery-form-b...@googlegroups.com, vzm...@gmail.com
Hi, that's a good example for jquery form builder. I used your plugin and have an error : "ReferenceError: $related_generic is not defined". Error in line 174, I wonder what is "$related_generic" ? in var $related = $($related_generic);

Vào 16:31:34 UTC+7 Thứ năm, ngày 02 tháng tám năm 2012, vzmind đã viết:

Oscar

unread,
May 14, 2013, 10:10:44 PM5/14/13
to jquery-form-b...@googlegroups.com
hello vzmind download the jquery.formbuilder.select, and make your changes in the file jquery.formbuilder.core explained here in the forum, it still does not show me the select field, you could help me is that I've been studying the code and not achievement know what happens.
Reply all
Reply to author
Forward
0 new messages