All of the documentation and examples I can find say you should be able to set the '#states' key in the top level array for a field in a node form from within a hook_form_alter() implementation. Like
I am using Webform module and I want to have a custom thank-you page. In my webform settings (called 'test-form') : Administration > Structure > Webform > Confirmation type, I have selected Inline.
But I have created a hook because I want the webform to redirect to a specific thank you page based on their submissions and I want to send the data using Rest API.
Unfortunately, it doesn't work, I have the impression that the confirmation type in the settings overwrite the redirect in the hook.
We're writing a custom module that needs to create a horizontal bar graph. We looked at the Charts module, but we're having to mimic a report generated by a desktop app, and it doesn't appear that we can get everything in with that module, leaving us to try drawing would own bars. We've put together a function on the site that will return an image of a specified color and width using GD. The issue we're facing is the specifications for the site must work on mobile, tablet, and desktop. This requires being able to give the function a pixel width based on the browser window width, which
Alright, so I have a custom block that is implements a build() method. I also have a controller which loads in terms and should they pass certain requirements, it will return a binary file response, displaying an SVG file. I want my custom block to call this controller method and display the rendered BinaryFileResponse, but I'm not quite sure how to do this.
So, i need to edit a Views block to make it unreachable trought keyboard navigation / tab focus. What came first to my mind was adding an attribute (tabindex=-1) to its first div or the anchors/buttons inside ( html4 do not support tabindex on divs), making this change directly to the html. Its possible? Would love some advice on this.