• Resolved kiekers

    (@kiekers)


    Hi, bit of a reach, I’ve got two repeater fields setup on posts, which work perfectly, but I’m trying to preset values into those fields that I can see loads in an iframe. Is this at all possible? I’m thinking that it is, since the iframe originates from my own server.

    Just some background on why I’m trying to do this:
    I’ve implemented a tinymce button that opens up a prompt for some data. Based on this data, it adds some content to the editor. This part works fine, but I also want to add some data to a new row in the repeater fields. Getting the data is not an issue, I just need to set the textbox values.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kiekers

    (@kiekers)

    Nevermind, I got the solution, posting it here in case someone needs to do the same 🙂
    `var frame = document.getElementById(‘panda-repeater-add-new-565-572’);
    var docframe = frame.contentDocument ? frame.contentDocument : frame.contentWindow.document;
    docframe.querySelector(‘#pods-form-ui-pods-field-nommer’).value= e.data.bronNommer;

    Thread Starter kiekers

    (@kiekers)

    refer to answer above for the JS to set content of a field inside an iframe. You obviously need to change variable names to your solution, but the code works great.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set values of fields in repeater’ is closed to new replies.