Hidden field can never be required. Skip that validation (#716)

* Hidden field can never be required. Skip that validation

* Refactor form logic editor UI with improved text and styling

- Replace UAlert with plain text description
- Update action description text
- Remove help text from select input
- Simplify note about hidden field requirements

* Add test for form logic field visibility and validation

- Implement test case for fields hidden by logic conditions
- Update AnswerFormRequest to use new FormLogicPropertyResolver method for hidden field check
- Ensure required fields are skipped when hidden by form logic

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2025-03-12 12:17:06 +05:30
committed by GitHub
parent a5162192b1
commit 7b942997ce
3 changed files with 75 additions and 2 deletions

View File

@@ -45,6 +45,9 @@
<h5 class="font-medium text-gray-700 mt-3">
2. Actions
</h5>
<p class="text-gray-500 text-xs mb-3">
Action(s) triggered when above conditions are true.
</p>
<flat-select-input
:key="resetKey"
v-model="logic.actions"
@@ -52,11 +55,14 @@
:multiple="true"
class="mt-1"
placeholder="Actions..."
help="Action(s) triggered when above conditions are true"
:options="actionOptions"
@update:model-value="onActionInput"
/>
<p class="text-gray-500 text-xs mb-3">
Note that hidden fields can never be required.
</p>
<modal
max-width="sm"