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
I am withdrawing my question for the following reason: https://forum.backdropcms.org/comment/8960#comment-8960
Error when trying to check for updates
My hosting is located in a country that blocks numerous online resources, so I am not surprised that updates and modules are unavailable. However, everything works perfectly on a local server...
Unable to run update - fails with Connection timed out
UPDATE: I fixed the errors that I found in the logs. They were related to deleting an old blog content type pulled over from Drupal that was still referenced in one of the layouts. I updated...
missing "add block" in custom layout