You are browsing as a guest. Sign up (or log in) to start making projects!

6h 46m 10s logged

Devlog 6 - Template creation form

In this 6h 44m, I made a lot of features but the main highlight was the work on the template creation form ( continuation of previous devlog)

Story Time:

Basically my project is a wedding invitation page generator. My website will have a lot of prebuild invitation template(HBS) for different different events

So the point is different templates require different forms should be filled by the user.

Therefore when the admin create different template, the admin should list the require fields for the form of the specific template.

Problems faced:

My thoughts was to make a prebuild list of fields, from that the admin should list them in specific order.

Problem - 1

The first problem was there is no form element to do these. So i used a select element with a ‘Add’ btn.

For the sorting, at first i used up/down button, but that wasn’t smooth. After researching I found sortable js.

At first sortable js also was not smooth, I fixed that by removing some bootstrap classes from the tag.

Problem - 2

The next problem I faced was I cant use required in the custom fields list maker, So I can’t make that field mandatory.

Solution (simple)

The solution was simple,
I made a invisible <textarea required .....>, and add the list of fields to that in json string when the admin edited the list.

Thank you for reading ❤️,
Mrithul.

0
5

Comments 0

No comments yet. Be the first!