I was testing the use cases of the module and found unexpected behaviour for required field. Here I a just giving an example for admin and content editor (Who is not permitted to "Switch to advance form") option.

With Admin

Steps to see the behaviour when applied to required fields
1. Go to Configuration admin/config/user-interface/advancedform and paste below mentioned line for article content type form
article-node-form:[ .form-text]

2. Now go to node/add/article and you will see
--- Label is still there for mandatory field, but the input field is invisible (see the Pointer 1 in the pic). then if you try to submit this form return Title is required error message (see Pointer no 3).

Display error

With Content Editor/User

(who has access to that form)
Display error

Both screenshots show that a module doesn't support for required field because it just use js for make fields hidden.

Seems not good for end site admin who is not technical.

Suggested Solution

---- Required field should not get hide.

Comments

RavindraSingh’s picture

Issue summary: View changes
RavindraSingh’s picture

Issue summary: View changes
RavindraSingh’s picture

Issue summary: View changes
RavindraSingh’s picture

Title: Required fields should not get removed using Advanced Form Module » Required fields gets removed which stuck the form submission

Required fields gets removed which stuck the form submission

RavindraSingh’s picture

Title: Required fields gets removed which stuck the form submission » Required fields get removed which stuck the form submission

Required fields get removed which stuck the form submission

RavindraSingh’s picture

Title: Required fields get removed which stuck the form submission » Form submission get stuck if required field get removed

Udated title

dman’s picture

Status: Active » Closed (works as designed)

Thanks for the screenshots and clear report. I appreciate the time you took to describe the issue.
However, the obvious solution is "Well don't do that then"

As it's up to the admin to decide what to hide and what not to, I would expect that the admin would figure that what they had just done was a terrible idea, and fix it.
If you want to, the tool can hide the 'submit' button, all input fields, or the whole form itself.
That would be a mistake for you to choose to to, but it's not prohibited, and it would not be prevented by trying to add special exceptions for 'required' fields - you can always hide the container element that contains a required field, so that just doesn't help.

Unfortunately, the css-like selectors that you use for the configs *are* somewhat technical - it's not a a for-dummys tools. The flexibility there is powerful, but power needs to be used responsibly.
So I do expect a user to experiment with the patterns, see the results, and then decide if they really want that result, or if they should change it.
The solution may be through additional documentation (though I think I put too much on that page already!) but it's not through making it less flexible.