Skip to content

Hidden Field No Longer Works #113

EricHamby opened this Issue May 24, 2012 · 2 comments

3 participants


Using the updated options.php the drop down hidden fields no longer work.


Works for me.

Make sure to have the function optionsframework_custom_scripts in your functions.php file (like it has in options-check), if you want that to work.

@devinsays devinsays closed this Jun 24, 2012

just ran into this, didn't realize that the options.php had to add an action, so i thought it was broken too. since i am hacking this up to work as plugin options, i decided to add a class to any checkbox that I want to serve as the "toggle" for the ensuing hidden input

$options[] = array(
    'name' => __('Check to Show a Hidden Text Input', "po-starter"),
    'desc' => __('Click here and see what happens.', "po-starter"),
    'id' => 'example_showhidden',
    'class' => 'has_hidden_child',
    'type' => 'checkbox');

then in the custom.js file a little .each() love so that the whole thing happens automatically without the need to manually write anything further (and with explicit IDs) for every hidden input you care to use.

    // checkboxes with hidden inputs 

        if ( $(this).is(":checked")) { 

        $(this).change(function() { 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.