I am using a Colorbox modal for a image selection in one of my forms. Is there a way to dynamically pass the image selection outside of the Colorbox and then close the Colorbox?
I have been searching here on StackOverflow but I cant find anyone else trying to achieve the same thing.
I figured it out.
After adding Jquery to the file loaded in Colorbox I was able to use
window.parent.$("#select").after('<input type="hidden" name="image" value="' + img + '">');