Support » Plugins » Hacks » Save widget options as array

  • Resolved shazdeh

    (@shazdeh)


    I’m using WP_Widget class and I have something like this in my form function:

    <p>
    			<label><?php _e('Test:') ?></label>
    			<input type="text" name="<?php echo $this->get_field_name('test') ?>[]" class="widefat" />
    			<input type="text" name="<?php echo $this->get_field_name('test') ?>[]" class="widefat" />
    		</p>

    Now, shouldn’t WP save the ‘test’ field as an array? When you use Options API it does, why this doesn’t work on widgets?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Save widget options as array’ is closed to new replies.