Enhance FieldOptions Component with Conditional Placeholder Input (#773)

- Added a conditional rendering for a `text-area-input` for placeholder text when the field type is 'text' and supports multiple lines, improving user experience in form customization.
- Updated the existing `text-input` to use `v-else-if` for better logical flow in rendering based on the presence of a placeholder.

These changes aim to enhance the flexibility of the FieldOptions component by providing users with more options for input placeholders.

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala 2025-06-05 21:08:58 +05:30 committed by GitHub
parent a11fb01bef
commit 705bff439e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -501,8 +501,15 @@
</div> </div>
<!-- Placeholder --> <!-- Placeholder -->
<text-area-input
v-if="hasPlaceholder && field.type === 'text' && field.multi_lines"
name="placeholder"
class="mt-3"
:form="field"
label="Empty Input Text (Placeholder)"
/>
<text-input <text-input
v-if="hasPlaceholder" v-else-if="hasPlaceholder"
name="placeholder" name="placeholder"
class="mt-3" class="mt-3"
:form="field" :form="field"