开发者

Limiting validation to the create page not the edit page

What is the best way to limit your custom validation check to the add page an开发者_C百科d not the edit page?


You could use the arg() function to check that you're on the /node/add/... page. Try changing the first line inside your hook_form_alter implementation to read...

if($form_id === 'external_favourite_node_form' && arg(1) == 'add') {
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜