Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: required but conditional filed is validated #5351
    fritsgarrer
    Member

    Unfortunately workflows is not a possibility for my use.

    Can you tell me why you choose not to put the possibility of “required” into the conditions array? I personally don’t see why it would be a bad thing. But maybe I’m thinking the wrong way for a sollution.

    btw what I forgot to say in my last post: Piklist is in my opinion the “one plugin to rule them all”. Where I used to have about 12 plugins I now only use Piklist and Yoast.

    in reply to: required but conditional filed is validated #5290
    fritsgarrer
    Member

    Isn’t it possible to add a ‘required’ subparameter to the ‘conditions’ parameter? And if used it overides the ‘required’ parameter in the field declaration.

    piklist('field', array(
    		'type' => 'text'
    		,'scope' => 'post_meta'
    		,'field' => 'name'
    		,'label' => __('Name')
    		,'required' => true //void if used within conditions parameter
    		,'conditions' => array(
    			array(
    				'field' => 'master-field'
    				,'value' => 'yes'
    				,'required' => true
    			)
    		)
    	));
Viewing 2 posts - 1 through 2 (of 2 total)