Currently the context reaction plugin will only work if the altered form has a non-dynamic form id, eg user_register_form for instance, but it won't work if you have something like my_form_10 or my_form_20...
It would be nice to match the form id thanks to a strpos, patch is coming.

Comments

jsacksick’s picture

Status: Active » Needs review
StatusFileSize
new735 bytes
doublejosh’s picture

What an interesting bonus!

What about regex :)

jsacksick’s picture

I don't see a need for that, but perhaps you have some examples where it can be useful? The form id I'm building looks like string_(entity_type)_(entity_id).
The strpos will work for that because the beginning of the string is static.

doublejosh’s picture

Maybe it should borrow the same wildcard setup seen often for path textareas.

jsacksick’s picture

Why not, though using drupal_match_path() sounds kind of weird, but it could/should work.

doublejosh’s picture

The function name does make us feel bad, but what is provides is right. This is a great idea, not sure when I will need it add it. Happy to accept a patch!