How to repopulate form fields using the validator class when validation fails?
  • toymachiner62toymachiner62 February 22
    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?
  • Lance February 22
    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
    );
  • toymachiner62toymachiner62 February 22
    Thanks man. I know i've seen this section somewhere but I couldn't find where it was.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories