Reputation: 629
We have a powermail form with a huge amount of fieldsets and each fieldset containing 3 fields:
The requirement is that only those fieldsets are sent in which is at least one valid field.
So we managed the simple validation for "filled/not filled" with the pipe-solution, which means, that the first item is followd by a pipe | - and if this item is selected, the whole field is invalid and will not be sent. Example (selection items):
The effect is, that when the form is sent, we get a list with the filled fields, all not-filled-fields are missing - that's okay.
Here's the real problem: If I want to set a title (as text-field) to a fieldset, for that I can see what "article" it is, when it's filled, then this title-field is also shown when no select-field is valid (= not filled).
Here's the real question: Does anyone have an idea how I could manage that the whole fieldset is not sent when the fields in it are "not valid" (= not filled).
Additional Info: I already tried powermail-conditions - but this is more a fearure to handle database data via ajax.
Upvotes: 0
Views: 868
Reputation: 629
I found a half solution:
Template Constant-Editor: Powermail(43) plugin.powermail.markerALL.hideLabel > check
Select-values will also be ignored, when the "not valid" value is only a pipe | (not "-|" or "...|").
Too bad that this is not well documented.
Upvotes: 0