• Resolved Rubyfire

    (@rubyfire)


    This simply says hey if there has been text input then update but if not then pull from previously set option right?

    // validate our options
    function plugin_options_validate($input) {
    $options = get_option('plugin_options');
    
      if(strlen($options['text_string']) > 0){
    	  $options['text_string'] = trim($input['text_string']);
      }elseif(!strlen($options['text_string']) > 0){
    	  $options['text_string'] = $options['text_string'];
      }
    return $options;
    }
  • The topic ‘Validation Not working?’ is closed to new replies.