You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is it possible to style fieldstype for individual forms?
The situation is this - the site will use 2 forms that both contain the radio fieldtype.
In the first form (contact) the radio fieldtype will be used "normally" - as a list with options.
In the second form (booking), the radio fieldtype will be used as a "radio group".
Therefore, I would need to style the radio fieldtype separately for each of these two forms. For an idea of what the radio group should look like, you can look here - https://alpinejs.dev/component/radio-group
all fieldstype views are stored in /views/vendor/statamic/forms/fields/. I thought of using a condition, but was unsuccessful. The condition looked like this (just an example):
{{ if form:contact }}
<div>
<span class="font-bold text-secondary-300">{{ trans :key="display" }}</span>
{{ if instructions }}
<p class="font-normal text-sm my-1">{{ trans :key="instructions" }}</p>
{{ /if }}
</div>
{{ else }}
<div>
<span class="font-bold">{{ trans :key="display" }}</span>
{{ if instructions }}
<p class="font-normal text-sm my-1">{{ trans :key="instructions" }}</p>
{{ /if }}
</div>
{{ /if }}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, is it possible to style fieldstype for individual forms?
The situation is this - the site will use 2 forms that both contain the radio fieldtype.
Therefore, I would need to style the radio fieldtype separately for each of these two forms. For an idea of what the radio group should look like, you can look here - https://alpinejs.dev/component/radio-group
all fieldstype views are stored in
/views/vendor/statamic/forms/fields/
. I thought of using a condition, but was unsuccessful. The condition looked like this (just an example):Beta Was this translation helpful? Give feedback.
All reactions