Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #5874
      kplaneta
      Member

      Piklist v. 0.9.9.7
      Wp v 4.4.3

      1. When a hidden field is within an add-more group and a new group is added, then the hidden fields gets the value of the hidden field from the first group and not the value defined in the settings.

      Example.

      Let’s say we have a simple add-more group “Person” with fields “name” and a hidden field which holds a random ID. The value of this field is generated with JS when somebody enters a name. The value isn’t generated when one is already present.

      Now, when we create the first person, the value in the hidden field is empty (it was set to be empty in the fields settings php) so it gets filled with a random number by the JS. Now, when we create another person, the value of this field is empty again so once again it gets filled with JS. So far so good.

      We save the page. It refreshes. We add another person. And this is where the error shows. This time the value of the hidden field is not empty but gets copied from the first person!

      2. When a string with a coma gets entered in a hidden field, than on first save it is returned intact. However on the second save, it gets turned into an array which seems to get another “level” each time the page is saved.

    • #5879
      Steve
      Keymaster

      @kplaneta– Interesting find. Can you post some code for us to look at?

    • #5880
      kplaneta
      Member

      It’s basically the same as in this thread

    • #5881
      kplaneta
      Member

      As for the second case, I used the code from here

    • #5893
      Steve
      Keymaster

      @kplaneta– Thanks. We’ll take a look.

    • #5927
      kplaneta
      Member

      Update. I’ve found out that whatever data I put into a hidden field (be it a text, digit or number) I get an array as return value.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.