ReactJS | How to generate dynamic form from JSON with react?

preview_player
Показать описание
In this tutorial, we are going to create the dynamic form. We will create different components for checkbox, input field and select box. We will render different type of fields base on the data.
Here we used some modern JavaScript technique to build this application.

Complete React Course

Support us with Bitcoin:
1NTuEsXoXE89YiJRNoBDBBRBECE7P9mBik

Open Crypto Wallet

To get the latest Udemy coupon and news, subscribe our telegram channel

If you want to more familiar with the modern JavaScript and React, the following courses can help you

Complete Modern JavaScript BootCamp from the beginning

React - The Complete Guide with React Hook Redux 2020 in 4hr

0:00 Introduction
2:21 Add bootstrap cdn

5:09 Create Element component
9:08 Create Input, Select and Checkbox components
9:58 Render different components base on the JSON data
11:38 Pass data to the input field
14:00 Pass data to the select box
15:20 Pass data to the checkbox
16:25 Create Context for the form
17:00 Create handleSubmit and handleChange functions
18:23 Add handleChange to the input fields
21:59 Add handleChange to the select box
23:10 Add handleChange to the checkbox
23:46 Fine tune the handleChange and handleSubmit functions

source code :

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🔥Complete Courses🔥
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Complete NodeJS course with express, socket io and MongoDB

Complete Progress Web App BootCamp

Complete Modern JavaScript BootCamp from the beginning

React - The Complete Guide with React Hook Redux 2020 in 4hr

Vue JS and Firebase:Build an iOS and Android chat app [2020]

New SAT Math Course

New SAT Math Practice Test Explain

Get A* in GCSE Maths (Quadratic equations and graph)

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
💟Follow me
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

***Equipment that I use***

Macbook Pro



Blue Yeti USB mic



Camtasia

#javascript
#webdevelopement
#react dynamic form
#react json schema form
Рекомендации по теме
Комментарии
Автор

Join the affiliates program and start earning money🚀

ckmobile
Автор

Hope you guys enjoy this video! Keep learning and your dreams will come true :) Don't forget to SUBSCRIBE for more videos

What will you create with ReactJS ? Please leave a comment below.

You can also subscribe to get info or our (free) course coupons


Read articles:

Support what I do and push me to keep making free content

ckmobile
Автор

excellent video. everything I needed to learn. Thank you so much!

gilberto.savoini
Автор

Thank you so much! This was exactly what I was looking for!

FelipeDias
Автор

this is good stuff. I've added complication to this for myself by trying to apply the concepts to a react typescript project. Interesting challenges.

karlkrasnowsky
Автор

Great tutorial and explanation. Tried it out and it works perfectly. Thanks for taking the time to share 👍

acesOfGreen
Автор

Super helpful much apperciated ! Thank you

thecombativemedic
Автор

wow! I finally understand it! thank you!

jerocamp
Автор

I love your voice ..Thank you for the tuorial.

bishalbhattarai
Автор

thank you so much for this great video

rajeevbhosle
Автор

Thank you for this video. BTW, you forgot to implement field_mandatory.

tabliqatchi
Автор

This what I was looking from few days Thanks.
I have one question can we bind each and every form field

arjungarad
Автор

Thank you! This is great. But this solves only one part of the problem I am working on.
I need to understand how can we use drag and drop to create custom form, for example let say I have a tool box with all the UI elements and just by drag and drop, I create the form and then on submit save the json in DB. This json is then fetched and will be rendered as form as explained in this video.

amkforu
Автор

Hi ckmobile, this video is very useful. I have never ever seen this kind of videos with clear explanation. Can you please update this same video using Next.js ? Thanks in advance.

OMAtom
Автор

take care ! in the git repository, the index.html contains a Virus => html:script-inf[Susp]

girofare
Автор

by the way, not a good idea to index an object map by the loop index. You have the field_id, I suggest using that.

karlkrasnowsky
Автор

Great content. I've a question though, lets say we have a select field in the form, and selecting any option would render a child form.. how would one go about doing that?

ronitmishra
Автор

This is nice video, thanks! Have you ever used json-schema to make it dynamic ? it is similar with this, but instead of using json file, UI info coming from API.

dumadoniagarasambora
Автор

Everyone talking about dynamic control is there a way we can have dynamic html template ? Your forms does not look showing control from top to bottom what if i want to add some template in it ??? Reply

aqkhana
Автор

This video is very useful. I didn't seen this kind of video on youtube still now. Can you please continue with this video by adding a "discard changes" button?

ragamisgod
welcome to shbcf.ru