How to repopulate form fields using the validator class when validation fails?

edited February 2012 in Bug Reports
I was trying to just use the standard CI form_validation class and on validation failure, I just set

<input name="name" value="<?php echo set_value('name'); ?>" />

Dwoo won't let me use set_value.

How can I either:
1. repopulate the fields on validation failure
2. or add set_value to the dwoo allowed functions?

Comments

  • edited February 2012
    Pretty sure the DWOO allowed functions are in: /fuel/application/config/parser.php

    Around line #75
    $config['parser_allowed_php_functions'] = array( 'strip_tags', 'date', 'js', 'css', 'swf', 'img_path', 'css_path', 'js_path', 'swf_path', 'pdf_path', 'media_path', 'cache_path', 'captcha_path', 'assets_path', // assets specific 'fuel_block', 'fuel_model', 'fuel_nav', 'fuel_edit', 'fuel_set_var', 'fuel_var', // FUEL specific 'quote', 'safe_mailto', // HTML/URL specific 'session_flashdata', 'session_flashdata', // Session specific 'prep_url', 'site_url', 'show_404', 'redirect', 'uri_segment' // CI specific );
  • Thanks man. I know i've seen this section somewhere but I couldn't find where it was.
Sign In or Register to comment.