question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help with making a GUI form builder

See original GitHub issue

Hi! Thanks for your great work. I’m trying to create a GUI form builder similar in idea to https://github.com/json-schema-form/json-schema-builder, but with a different interface.

I’ve hacked a proof of concept together using custom bindings and temporarily a text area to edit the form property schema.

this.fieldBindings['/firstName'] = [{
   'click': this.selectPropertyToEdit.bind(this)
}];

selectPropertyToEdit(event, formProperty: FormProperty) {
  this.selectedProperty = formProperty.schema; // for display in the text area
  // use arrow function for closure
  this.onTextAreaChange = (data) => {
    const newSchema = JSON.parse(data);
    formProperty.schema.title = newSchema.title;
  }
}
<textarea (change)="onTextAreaChange($event.target.value)" [value]="selectedProperty | json"></textarea>

I’m having some problems and therefore questions:

  1. Can I bind all the fields without explicitly specifying the path? Something like a wildcard bind, e.g. this.fieldBindings['/*']?
  2. Can I modify an existing form property schema without explicitly setting each property? I’ve tried Object.assign(formProperty.schema, newSchema) and formProperty.schema = newSchema which both produces weird results, i.e. both end up duplicating the form field. There is nothing similar to formProperty.setValue() like formProperty.setSchema().

Any tips would be helpful also. Please point me in the right direction (if I’m going in the wrong one) or to any library/feature like this that already exists. Thanks.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
daniele-pecoracommented, Oct 26, 2020

@aahventures Probably 😁

1reaction
daniele-pecoracommented, Oct 15, 2020

@aahventures

I would provide a custom SchemaValidatorFactory which would be used in the UI Editor (See doc for details). The implementation of the SchemaValidatorFactory simply contains no validation at all. This should speed up the validation process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Form Builder GUI - YouTube
CiviCRM Core Team member Coleman Watts demo'ing the soon to be released GUI interface for Form Builder / afform.
Read more >
The 9 best online form builder apps in 2023 - Zapier
The 9 best online form builder apps · Google Forms for quickly creating powerful forms for free · Microsoft Forms for analyzing form...
Read more >
Creating and Opening Forms | IntelliJ IDEA Documentation
GUI Designer equips the developers with the possibility to create GUI forms with the desired layout and bound class, and dialogs.
Read more >
30 of the Best Form Builder Tools for 2022 - HubSpot Blog
Form Crafts is a basic form builder tool that has a user-friendly interface and simple design. WordPress drag and drop form tool. Image...
Read more >
What is Form Builder? | A Beginner's Guide
Having a form builder software helps you run surveys and collect meaningful information to form analytical inferences.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found