Needs review
Project:
Node Add Title
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2014 at 03:08 UTC
Updated:
15 Aug 2016 at 23:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mastoll commented@rooby,
You identify three code issues with the latest dev version of this module. Can you suggest alternative coding?
i.e., here, how would you alter the code so that it selectively adds the after_build callback only to node forms and not to all forms?
Comment #2
N30 commented@mastoll
You add $form[after_build] under and if statement like this.
You can add different "after_build" function based on your form.
Comment #3
kopeboyCan we have a patch please?
I am just a site builder and this functionality is very important for multilingual sites..
Comment #4
rooby commentedThis should do it.
It uses hook_form_BASE_FORM_ID_alter() to just alter node forms.
another way is to use the $form_id variable from hook_form_alter() but that is a little messier in this case.