-
Notifications
You must be signed in to change notification settings - Fork 48
use correct field on dependent fieldsets #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Can you give an example (the syntax) of a form that is fixed by this? That is easier testing. |
|
|
Hmm, the fieldset field sets all its containing fields already to hidden by itself. So no logic is required later. I think checking if $field->hidden is true is already enough. (This means that the mail action can be simplified as well, but that is not scope of this PR) |
|
sometimes its so easy 😉 |
|
Hehe, thanks! I will test it if I have some free time. |
|
This solution doesn't yet prepare always replacement pairs (label-value patterns) for each field, because fields are skipped for closed/hidden fieldsets. While the original situation assumes that for all fields always such a pattern pair was created. Even when no value is given, a replacement pattern is needed to replace the placeholder with the Default value for a placeholder like: A solution could be to fill the syntax that let reproduce this situation: |
so default values can be used on replacement
when dependent fieldsets are used only the last field with the same name is taken.
@Klap-in @micgro42 can you have a look at it?
it is more or less used in mailaction to only get the correct fieldset. (https://github.com/splitbrain/dokuwiki-plugin-bureaucracy/blob/master/helper/actionmail.php#L105)