Show
Ignore:
Timestamp:
02/04/2008 07:00:18 PM (11 months ago)
Author:
PugFish
Message:

Added ability to use custom forms in Forge, rather than using a template which iterates over each input there is a variable for each input allowing more customisable forms.
Fixed valid_ rules not finding the i18n string.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/forge/controllers/forge_demo.php

    r1658 r1915  
    3838 
    3939                echo $form->html(); 
     40 
     41                // Using a custom template: 
     42                // echo $form->html('custom_view', TRUE); 
     43                // Inside the view access the inputs using $input_id->html(), ->label() etc 
     44                // 
     45                // To get the errors use $input_id_errors. 
     46                // Set the error format with $form->error_format('<div>{message}</div>'); 
     47                // Defaults to <p class="error">{message}</p> 
     48                // 
     49                // Examples: 
     50                //   echo $username->html(); echo $password_errors; 
    4051        } 
    4152