Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 26 20:25
    mrsaifullah52 commented #559
  • Nov 25 06:58
    oneplugin commented #379
  • Nov 25 04:05
    billystalnaker commented #379
  • Nov 23 09:37
    sheeraz100 commented #1196
  • Nov 23 08:30
    oneplugin commented #379
  • Nov 23 03:50
    billystalnaker commented #379
  • Nov 22 19:49
    fgroupindonesia opened #1234
  • Nov 19 13:10
    blockbaster commented #931
  • Nov 17 20:49
    blockbaster commented #1089
  • Nov 16 22:34
    billystalnaker commented #379
  • Nov 16 22:19
    billystalnaker commented #379
  • Nov 15 14:36
    oneplugin commented #379
  • Nov 15 14:36
    oneplugin commented #379
  • Nov 14 19:17
    oneplugin commented #379
  • Nov 14 19:11
    billystalnaker commented #379
  • Nov 14 18:34
    oneplugin commented #379
  • Nov 14 18:31
    billystalnaker commented #379
  • Nov 14 07:47
    oneplugin commented #379
  • Nov 13 23:57
    happymachines commented #1131
  • Nov 13 23:57
    happymachines closed #1131
Andrei
@stg-andrei
image.png
once I save the form like that and then render it as such
                <script>
                    jQuery(function() {

                        var jsonString = '@php echo $form->form_data @endphp'

                        var formData = jsonString,
                            formRenderOpts = {
                                dataType: 'json',
                                formData: formData
                            };

                        var renderedForm = $('<div>');
                        renderedForm.formRender(formRenderOpts);

                        console.log(renderedForm.html());
                        $('.tagMe').html(renderedForm.html())
                    });
                </script>
the render breaks
This is the form stored in the database
[
  {
    "name": "text-1623756316356",
    "type": "text",
    "label": "Text Field",
    "value": "<script>console.log(\"ready\");</script>",
    "access": false,
    "subtype": "text",
    "required": false,
    "className": "form-control",
    "maxlength": 255
  },
  {
    "name": "checkbox-group-1623757563010",
    "type": "checkbox-group",
    "label": "Checkbox Group",
    "other": true,
    "access": false,
    "inline": false,
    "toggle": false,
    "values": [
      {
        "label": "Option 1",
        "value": "option-1",
        "selected": true
      },
      {
        "label": "Option 2",
        "value": "option-2",
        "selected": false
      }
    ],
    "required": false
  },
  {
    "name": "radio-group-1623757585474",
    "type": "radio-group",
    "label": "Radio Group",
    "other": true,
    "access": false,
    "inline": false,
    "values": [
      {
        "label": "Option 1",
        "value": "option-1",
        "selected": false
      },
      {
        "label": "Option 2",
        "value": "option-2",
        "selected": false
      },
      {
        "label": "Option 3",
        "value": "option-3",
        "selected": false
      }
    ],
    "required": false
  }
]
Allen Liu
@Allenci
@stg-andrei Can you try addslashes() then json_encode() when store ; json_decode() when render
// in PHP
$store_to_db = json_encode(addslashes($form->form_data));

// in your JS
 var jsonString = '@php echo json_decode($store_to_db) @endphp'
nasrulhakim96
@nasrulhakim96
hi, may i know.. how to renderform with userdata, cause checkbox-group is not detected
example:-
{
type: "checkbox-group",
label: "Checkbox Group",
className: "checkbox-group",
name: "checkbox-group-1478704652409",
values: [
{
label: "Option 1",
value: "option-1",
selected: true
},
{
label: "Option 2",
value: "option-2"
},
{
label: "Option 3",
value: "option-3",
selected: true
}
],
"userData": [
"option-3"
]
},
Andrei
@stg-andrei
@Allenci I already store the string as a json when I save it
or wait I think I am actually making a mistake
Andrei
@stg-andrei
@Allenci thanks, your example pointed me the correct way
brianseipp
@bseipp
Hello! I am trying to render saved forms for editing later
And am getting an error saying that the addField function doesn't exist, despite it showing up in a console log
    var fbEditor = document.getElementById('fb-editor');        
    var formBuilder = $(fbEditor).formBuilder()
    console.log(formBuilder);

    $.each(originalFormData, function( index, field ) {
        formBuilder.actions.addField(field, index);
    })
Is this a race condition?
brianseipp
@bseipp
Figured out the better way to load data. Please disregard.
jayden626
@jayden626
@Amy518 Try out formbuilder_depends from rendezz https://github.com/rendezz/formbuilder_depends
It's not perfect and doesn't work for ALL fields (making a Header optional will break it), but it's a start.
Hasnni
@Hasnni
hello Guys.
getting this error what should i do now . I am using jquery formbuilder version 3.6.1.. assets/lang/en-US.lang:1 Failed to load resource: the server responded with a status of 404 ()...
jeremiah sherrill
@jeremiahsherrill

https://formbuilder.online/docs/formBuilder/demos/angular/ page is broken, getting ModuleNotFoundError
Could not find module in path: '../jquery/dist/jquery.min.js' relative to '/package.json'

just making whoever needs to be aware

Marc Allen Mojica
@mrclln
Hi ,Can someone help me. Please , Im having issue with multiple form render, i have an array passing to my blade, i.e. i have 3 results from the controller, i rendered those 3 results via loop. it displayed smoothly.. but when i use 'userData' to get the values from forms, it only returns the value of the third rendered-form. even if i set my fetch like this..... $('#firstrenderedform').formRender('userData'); it will always return the ('#thirdrenderedform') value
1 reply
Rahin Makrani
@rahumakrani
Can someone help me? please
Can someone help me? I'd like to hide/remove Options from AutoComplete, please advise how to achieve this?
MuhammadRafiqKhan
@MuhammadRafiqKhan
hi there
can someone help me i want to use this library/plugin but i want to give style to the drag and drop portion
i want to use this in HTML,CSS,BOOTSTRAP
RAGHV143
@RAGHV143
Hi can someone help me,my requirement is that i want to console json by creating by form builder because i want to store this data in nosql data base
how is it possible
Vaibhav Jain
@VJ1994_gitlab
Hi, can someone help me, my requirement is that i want to make predefined field & also disable the properties/attributes of the field except placeholder.
Johann Hernández Armenteros
@johha86
Hi, is in some place any doc of how to add bootstrap style
gharri
@gharri
Hi, How can I add the dependencies just by javascript tags, instead of installing node js? Maybe I need to edit the source code, so the minimized js file is not helpful for me. Thank you.
Andrei
@stg-andrei
Hey guys, I cloned the project from github in order to make my own custom plugin (a table matrix, I built it with html and jquery and I am trying to import it in formBuilder)
Basically as a starter I duplicated the starRating.js custom plugin from src/js/control_plugins, I renamed it and did
npm start build:all and npm start, but I dont get it its not showing up when my local dev server is launched in my browser..and I missing something?
taag me pls if anyone can help with the confusion
Andrei
@stg-andrei
the docs i ve been reading are found here: https://formbuilder.online/docs/formBuilder/control-plugins/
lappi357
@lappi357
Hello Everyone
Can someone help me out in creating a nested element like below
{
label: 'User Agreement',
fields: [
{
type: 'header',
subtype: 'h3',
label: 'Terms & Conditions',
className: 'header',
subSection : [
{
type : 'text',
label : 'Test Child'
},
{
type : 'checkbox',
label : 'Test Child'
},
{
type: 'textarea',
label: 'Short Bio:',
className: 'form-control',
}
]
}
],
}
lappi357
@lappi357
I just need to create a Sub section element
wangzhongfei1
@wangzhongfei1
Can someone help me? I want to know how to get the instance array of custom plugin from src/js/control_plugins.
@kevinchappell
wangzhongfei1
@wangzhongfei1
image.png
wangzhongfei1
@wangzhongfei1
Can someone help me? The setData in the screenshot doesn't work
2 replies
afrizal muchrom
@afrizalmuchrom:matrix.org
[m]
hi all, iam new member
i just use formBuilder in my laravel, and work, but i want to create dropdown for field/control like this, please help me.. thanks before :) *sory my bad english
gaurav-techies
@gaurav-techies
can formbuilder give output in html css or hbs
Vaibhavi Sojitra
@vaibhavisojitra25
Hello
can anyone help to fix issue about File Uploading ?
I have a web portal in laravel framework. there is a form builder where i can create form. In that form if am putting multiple File upload fields and uploading files with same extension , it saving only one image .. But if am uploading different extensions like abc.jpg and xyz.png. its working fine.
Suganya209
@Suganya209

Hello
Can anyone help me to fix this?

I have created the checkbox with the labels, 'Blue', 'Green', 'Red'. And the following is the checkbox data,

{
"type": "checkbox-group",
"required": true,
"label": "Colors",
"name": "checkbox-group-1626754981357",
"values": [
{
"label": "Blue",
"value": "Blue"
},
{
"label": "Green"
},
{
"label": "Red"
}
]
}

I select the green color from the checkbox. And I'm getting the following user data.

{
"type": "checkbox-group",
"required": true,
"label": "Colors",
"name": "checkbox-group-1626754981357",
"values": [
{
"label": "Blue",
"value": "Blue"
},
{
"label": "Green"
},
{
"label": "Red"
}
],
"userData": [
"on"
]
}

In the userData array, it is returned as ['on']. The green color checkbox is not selected. To avoid this issue, value has to be provided for all the labels. But in the form builder, the values are optional. How do I enforce it in the form builder to give values for all the labels? Kindly help me to fix this issue.

Rogério Carrasqueira
@rgcarrasqueira

Hello Guys! Nice to meet you!

I would like to know if someone knows how to create a custom control that avoid field repetition in the form. For example I've created a custom control that brings a email field to the form but I don't want to allow the user to drop the field twice in the form. Is that possible?

Thanks so much for the help!

Rogério Carrasqueira
@rgcarrasqueira
Hello Guys! Is it possible to make checkbox-group not editable?
ketanbacancy
@ketanbacancy
Hello All,
How can i add events on attribute of control ?
Like i need to make name attribute dynamic. Means i want same name attribute as lable
elliehachemjob
@elliehachemjob
hello can you help me?
crazykenvn
@crazykenvn
Hello, can some one help me to create my custom select control? i want to create my own select load data from database
Robert Kemp
@RobertWKemp_twitter
Hello, does anyone know of a way to add a subtype of div to the paragraph element?