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
Hi Jochen You could test https://github.com/backdrop-contrib/commerce_invoice_receipt which doesn't yet have a release, but may meet your needs when combined with other modules to generate...
Commerce modules
Setting up a multisite with multilingual support can definitely get a bit tricky with all those configurations. If you're looking for a way to keep things clean, I've found that using a quick...
Multisite for multilingual website
Start with basics: install modules for meta tags and XML sitemaps, set proper alt text on images, and keep URLs clean. Backdrop SEO is mostly about structure and content quality, not tricks.
How to Improve SEO Performance in Backdrop CMS