Different Form Id's Based on Views for different filterblocks

ezra-g - May 15, 2007 - 15:56
Project:Views Filter Block
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Motivation: I want to selectively override the #value of the Submit button on forms generated by certain Views Filterblocks but not others. I would like to be able to target them using their Form ID. Currently, all form Id's return by the module are the same ('views-filterblock').
One way of generating unique form id's might be to prefix the name of the view on which the block is based with 'viewsfilterblock'.

Example:

view_filterblock_example_view

Thanks!

#1

douggreen - May 15, 2007 - 16:28

In theme_views_filterblock_output I added print_r($form) and see that the #view_name is attached to the newform. Can you not use this?

#2

ezra-g - May 17, 2007 - 22:46

You're correct -- I'll use that. Thank you!

#3

douggreen - May 18, 2007 - 01:17
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.