Welcome Guest, Not a member yet? Register   Sign In
Form validation set_value() and html tags
#8

@Silentium: thanks! Now I understand why the textarea has html tags and also html entities (when I look at the html source in my TinyMCE editor).
But the set_value() function has another purpose: re-populating a form when the posted values don't meet the form_validation rules.
In order to get that working for textarea's, I've added this function to MY_form_helper.php:
PHP Code:
function set_ta_value($field$tv NULL)
{
    
$CI =& get_instance();
    if (
$CI->input->post($field)) return $CI->input->post($field);
    return 
$tv;

Works really great now.
Reply


Messages In This Thread
RE: Form validation set_value() and html tags - by Wouter60 - 03-19-2015, 11:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB