Skip to main content
11 events
when toggle format what by license comment
Nov 15, 2014 at 2:44 answer added Timofey Drozhzhin timeline score: 1
Nov 14, 2014 at 5:21 answer added Alex Bukach timeline score: 0
Nov 13, 2014 at 22:46 comment added Timofey Drozhzhin I've updated the question for clarity
Nov 13, 2014 at 22:46 history edited Timofey Drozhzhin CC BY-SA 3.0
added 364 characters in body
Nov 13, 2014 at 22:39 comment added Timofey Drozhzhin ...so the solution works. My question is that although I am able to hide the element, the end-user is still able to manually edit html code to send the form, even-though it's not present.
Nov 13, 2014 at 22:37 comment added Timofey Drozhzhin Good article. Yeah, because path is added in path_form_alter, it's not accessible in hook_form_alter, which is why #after_built seems like it's the only way to override it.
Nov 13, 2014 at 22:34 comment added Mołot Also, see drupal.org/node/1131786 - was this what you are using? If solution stopped working, consider reopening that issue...
Nov 13, 2014 at 22:32 comment added Mołot I never experienced any serious problems with unsetting form elements directly. So 1) how do you know it's really $form['path']? 2) What exactly happened when you tried?
Nov 13, 2014 at 22:29 comment added Timofey Drozhzhin I've tried unset($form['path']) in hook_form_alter. As far as I know, it's not possible to unset the form in hook_form_alter, unless attaching it to #after_built.
Nov 13, 2014 at 22:13 comment added Mołot Why don't you just unset this field in hook_form_alter directly? I mean, a whole vertical tab. Try. And if you try and fail, post the code you tried. Make sure you inspect form's structure first, with kpr, var_dump or something.
Nov 13, 2014 at 22:08 history asked Timofey Drozhzhin CC BY-SA 3.0