Interesting Question!
I’ve never seen repeatable fields used in Widgets. Giving a full Answer would require too much work/time, so I’ll give you links to the resources I know, and hopefully you’ll make this work and share the solution with us 😉
All this examples deal with Meta Boxes, you’ll need to copy the jQuery scripts and adapt the post_meta
to the Widgets case.
-
Create more Meta Boxes as needed – WPSE Q&A
-
Repeatable Custom Fields in a Metabox – Gist
/** * Repeatable Custom Fields in a Metabox * Author: Helen Hou-Sandi * * From a bespoke system, so currently not modular - will fix soon * Note that this particular metadata is saved as one multidimensional array (serialized) */
-
Repeatable Custom Fields in a Metabox – Another Gist example, no description given. This one is quite interesting as it has the code to sort the fields.
Related Posts:
- Multiple entries in get_option results? or why is _multiwidget set to 1?
- framework for plugin/theme options panel? [closed]
- How do I add CSS options to my plugin without using inline styles?
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is get_option function cached?
- How come `wp_options` table does not have an index on `autoload`?
- Update Option Stored in Multi-Dimensional Array
- Custom Widget function in Plugin not working?
- What are the advantages to the Settings API?
- Where to store plugin settings fields
- Is get_option() faster than accessing get_transient()?
- What is the correct way to build a widget using OOP
- What’s the best method for emptying an option created with the Settings API?
- Releasing new plugin version, how to rename old options keys?
- WordPress updates defined vs add_filter?
- Widget development – Drop down options won’t save
- Creating Settings Page with dropdowns for Plugin
- Calling the widget id of a mult-instance widget from inside the widget?
- Is There A Hook To Process The Content Of The Text Widget?
- How to properly sanitize strings for update_option()
- How to add a new plugin page under desired Options page?
- Add content to widget title in admin area within the widget?
- Has anyone managed to integrate the wp_editor inside a widget?
- How do I handle multiple Submit buttons in plugin’s option page?
- Help adding image upload functionality to widget
- Using preg_replace to clean widget output HTML
- Edit the output of wp_widget_rss_output()
- Script to remove all inactive widgets?
- Deletion of shared options using uninstall.php
- Why won’t register_setting() create a setting?
- Possible to preset a widget’s contents via a plugin script?
- Dropdown list of pages to get page id to store in plugin options
- How to add multiple copies of a widget from “available widgets”
- Install widget on plugin activation
- update_option is not working!
- update_option_{$option} Too Few Arguments
- Save user-specific options in WordPress admin
- How to store accumulate multiple option values in a single array using Options_API
- Using Ajax call in jQuery doesn’t work in widget
- WordPress select dropdown list in widget
- Creating option to allow user to select the page my plugin content will display on
- Using $wpdb object in a widget
- Unified Approach for Placing Option Pages
- array_map() for sanitizing $_POST
- WordPress plugin options and jQuery
- WordPress Plugin Setting’s POST
- Is there a need to do apply_filter(‘widget_title’, $instance[‘title’]) or any other ‘widget_xxx’ filters?
- Performance of several get_option() calls
- Extend plugin options page
- Can I use the different settings sections over different pages using the save options group?
- Dynamic content in a widget
- How to pass custom options from widget form to widget update callback?
- Broken markup when using the_excerpt() in a widget?
- Options API – Validation Callback $input is NULL
- Tips for targeting widget dragable for WP Pointer on widgets.php page
- Best choice of options/settings framework for plugin/theme development
- How to create custom field in worpdress default widgets?
- Correct way check nonce (security) using old Options API
- PHP 7 – Class Method Compatibility Issue
- Widget Admin – Form Submit Event?
- How to store a medium amount of options?
- How to save WP widget instances and options
- Can I individually style items in the backend widget list?
- How to add settings subpage from a plugin to a settings page created in theme?
- Plugin options not being saved or created
- Remove Internal Style Sheet if no Value Provided?
- Sidebar widget to show popular post not working?
- Widget update function not saving values
- What could cause my plugin’s options/settings page not to load?
- How to set “Site Address (URL)” programmatically on WP multisite?
- WordPress setting with select – where is my mistake?
- Add custom element ID depending where the widget place is, sidebar or footer
- Customizer: widget-synced triggers twice
- Using wp_parse_args to set up Plugin Default Settings
- Add a class to a dynamic sidebar’s wrapper
- Custom delete option button in plugin settings
- Storing product price data in the database
- Widget is to be compatible with all themes
- How To Change Post Author Default?
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- Editing options pages?
- Multiple options pages validation for a plugin
- get_option() not returning expected value from plugin
- Parse form values before sending to options.php
- Widget Dropdown doesn’t working
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- How do I get the sub categories of the parent when in a sub category?
- How to limit number of number of categories displayed by categories widget
- Update problem with update_option() in combination with register_setting()
- Input in plugin widget does not allow spaces
- Get draggable widgets on Edit Post page
- Dynamically creating classes for Widget API
- Widget options are not updated
- Why does my widget break other widgets?
- Insert/Update values to a table after blogname option etc. is updated
- Access bloginfo, get_option, and plugins_url from a non-core php file
- wordpress how to query wp_options table
- CSS not affecting widget output
- Using a multiple element in widget form
- How Can I add Fields in wp-option table?