Skip to main content
1 of 6
Casper
  • 409
  • 1
  • 6
  • 19

Repeatable fields are gone after saving the post or page

Good afternoon everyone,

I am currently working on a slider plugin to learn a lot of PHP and WordPress. I have create some repeatable field with javascript.

When the user is clicking on a button, the last row will cloned and all values will reset. Also I add an increase to the javascript code for create unique ids for my input name and id and an unique id for my rows that I cloned.

The problem I have is when I want to save the page or post, that all fields will overwritten by default, I think so. This is weird since everything has a unique ID and name attribute. My question now is where exactly can lie and how I can best resolve this problem?

I know that I can make use of several other plugins, but as I said before I would like to learn a lot of WordPress and PHP scripting language.

Hopefully someone can help me out. I look forward to your response.

Also here you can see my PHP script and Javascript files:

Sincerely, Casper B

Casper
  • 409
  • 1
  • 6
  • 19