I'm trying to get the next field in an entry if a passwordRequired Lightswitch Field is switched off.
How would I go about that?
I'm trying to get the next field in an entry if a passwordRequired Lightswitch Field is switched off.
How would I go about that?
If you are really trying to get the next field in order on an entry type:
Field order can't be set on an entry type's field layout. Craft seems to set their order when you create them in Settings->Fields. Whatever you are trying to setup/accomplish this way I would recommend against.
If you are trying to retrieve entries that the lightswitch field is off:
{% for entry in craft.entries.section('sectionHandle').all().lightSwitchField('not 1') %}
{{ entry.field }}
...
If you are trying to get the sibling of an entry if the current entry's lightswitch field is off:
{% if not entry.lightswitchField %}
{% set sibling = craft.entries().nextSiblingOf(entry).one() %}
{% endif %}
I tried to give you several examples/solutions as your question isn't explicit.