 outputting form elements from handlers views allows handlers to output form elements wrapping them automatically in a form and handling validation submission the form is multistep by default allowing other modules to add additional steps such as confirmation screens implementation a views handler outputs a special placeholder in render while the real form with matching structure gets added in viewsform when the view is being preprocessed for the theme file all placeholders get replaced with the rendered form elements the views handler can also implement viewsformvalidate and viewsformsubmit function render values return formitem this options id this view rowindex function viewsform form formstate the view is empty abort if empty this view result return fieldname this options id form fieldname array tree true at this point the query has already been run so we can access the results foreach this view result as rowid row form fieldname rowid array type textfield title t your name defaultvalue optional validate function function viewsformvalidate form formstate fieldname this options id foreach formstate values fieldname as rowid value if value drupal formseterror fieldname rowid you can t be named drupal that s my name optional submit function function viewsformsubmit form formstate do something here modules can implement hookviewsformvalidate form formstate and hookviewsformsubmit form formstate the form is multistep by default with one step viewsformviewsform a formexample module could add a confirmation step by setting formstate storage step formexampleconfirmation in formexampleviewsformsubmit then viewsform would call formexampleconfirmation form formstate view output to get that step important  you can fetch the views object in formalter and validate submit hooks from form parameters view form parameters 2  relevant views functions templatepreprocessviewsview viewsform viewsformvalidate viewsformsubmit viewsformviewsform viewsformviewsformvalidate viewsformviewsformsubmit themeviewsformviewsform  hooks hookviewsformsubstitutions hookviewsformvalidate form formstate hookviewsformsubmit form formstate  