Closed mpourismaiel closed 4 years ago
This breaks existing users.
How about keeping the default fields and adding the option to add custom ones after the default ones similar to how you set the config:
[[fields.custom]]
name = "phone"
text = "Your Phone *"
error = "Please enter your phone number" # defaults to theme default
required = true
In the code we would add our default fields and afterwards iterate through the custom ones.
Thoughts?
That sounds really good.
Missed the WIP in the title. The code looked finished so ;)
Let me know, if you want me to revert.
I wasn't sure if the idea was polished enough. If you think it's good then fantastic!
What this PR does / why we need it: This is an idea I've been thinking about for a while and when I saw the issue, thought I create a PR for it. It's a breaking change since the config will change, but I added default inputs same as our previous sample. Please let me know what you think.
Which issue this PR fixes: fixes #753
Special notes for your reviewer: This is a work in progress and an idea. Please do not merge.
Release note: