I was reviewing #4509 and was playing with @indigoxela's PR on my local, trying to conditionally show/hide a warning if webp
was added to the list of allowed extensions for an image field instance.
A condition like this, where the value is "static" works fine:
'#states' => array(
'visible' => array(
':input[name="instance[settings][file_extensions]"]' => array('value' => 'png, gif, jpg, jpeg, webp'),
),
),
But the goal is to check the value of the field for any occurrence of webp
. Unfortunately, #states
doesn't seem to support regex OOTB
With some research, I've found this article: https://evolvingweb.ca/blog/extending-form-api-states-regular-expressions which would allow something like this:
'#states' => array(
'visible' => array(
':input[name="instance[settings][file_extensions]"]' => array('regex' => array('value' => '^.*webp.*$')),
),
),
Recent comments
Oh, that might be my problem! I've set the layout for taxonomy/term/1134 (the TID for the term in question), but the view is generating an entirely new page, not rebuilding that specific...
Adding a menu to a layout for certain taxonomy/view pages
I tried something similar with a Custom Block (instead of a menu). It did work for me. I enabled the Taxonomy Term view I created a layout for path taxonomy/...
Adding a menu to a layout for certain taxonomy/view pages
Hi Martin, Thanks for the quick reply. Depending on whether I receive an invoice, I could spend 300-400 euros on it. For the first one I don't need the submodules Kind...
Porting of module "Entity reference autofill"