Title: Adding repeatable fields used in Widgets &#8211; sidebar?
Last modified: August 22, 2016

---

# Adding repeatable fields used in Widgets – sidebar?

 *  [javihashtag](https://wordpress.org/support/users/javihashtag/)
 * (@javihashtag)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-repeatable-fields-used-in-widgets-sidebar/)
 * How can adding repeatable fields used in Widgets wordpress? I want add (Add more
   country favorites fields) and remove (Example … France)
 * what I actually Have
    [http://i.stack.imgur.com/F8k7J.png](http://i.stack.imgur.com/F8k7J.png)
 * what I want
    [http://i.stack.imgur.com/Pmze7.png](http://i.stack.imgur.com/Pmze7.png)
 * Any tips?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-repeatable-fields-used-in-widgets-sidebar/#post-5308269)
 * You do this with javascript or jQuery. When the user clicks on add field the 
   extra HTML is added to the form. When remove field is clicked, the related HTML
   is removed. Keep the IDs coordinated to facilitate this. This is all done client
   side, the server is not involved.
 * When the form is submitted, the PHP needs to be able to process an indefinite
   number of fields. I haven’t done this in a while, but I believe if you give the
   fields the same name, including ‘[]’ ( `<input name="country[]" ...` ) all the
   values end up in an array in PHP and you can simply `foreach` step through the
   values. Or something like that anyway.
 * I hope this helps.
 *  [GlapsGokul](https://wordpress.org/support/users/glapsgokul/)
 * (@glapsgokul)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-repeatable-fields-used-in-widgets-sidebar/#post-5308333)
 * hi how to add the widgets in the sidebar at anyother page..
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/adding-repeatable-fields-used-in-widgets-sidebar/#post-5308376)
 * GlapsGokul – if the sidebar has been [registered](http://codex.wordpress.org/Sidebars),
   just add the widget to it on the widgets admin screen. The sidebar then displays
   widgets added with `dynamic_sidebar()`.
 * FYI, we ask that people not tag on to other’s topics in these forums, this policy
   allows members to better focus on the OP’s specific issue. By starting your own
   topic, you will get everyone’s undivided attention. If you have any other questions,
   go ahead and start a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding repeatable fields used in Widgets – sidebar?’ is closed to new
replies.

## Tags

 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/adding-repeatable-fields-used-in-widgets-sidebar/#post-5308376)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
