tobz-nz/autoform-spark — Issue #3: Removal of error delimiters 
Author: kuroi
Created: 2012-02-21 13:38:16+00:00
State: open

Line 65 of the library removes the default Codeigniter form validation error delimiters. I suspect that this is done because the default p tags would upset the rather smart inline errors feature.

However, if the inline errors are disabled, the removal of these tags leaves the errors as plain text, and when other form elements are floated, they're displayed inline at the top of the form, i.e. disassociated from the fields to which they refer.

So I suspect that the set_error_delimiters(0 call should be predicated on the class var $inline_errors being true.

However, that wuold lead to a second issue, namely that the function call is made in the class constructor, so setting the inline-errors var to FALSE externally ($this->autoform->inline_errors = FALSE) would come to late to prevent the resetting of the error delimiters.

Though I guess the calling controller would override the overide and reset them back after autoform has been loaded. But that's getting a bit clunky!