Hi @mgaussie,
What you could do is have a ‘visible’ form that the user uses to change the search options. Each field would have a corresponding field in a ‘hidden’ form (you could either use hidden fields or set the whole form to ‘hide’)
Each of the hidden fields would be given a dynamic value of the corresponding visible input but also a dynamic attribute for disabled corresponding to ! the same, visible input value (e.g. !input1.value). That way, when the hidden form is submitted, only the completed inputs will be sent.
If you use naming, as suggested above, you could make the form submit in the exact json structure you want to send to ES.
2 Likes