I need help with the following: I have created a new <select>
button in a WordPress plugin. I want this button in a plugin, when selected, to select image from WordPress media library and upload to a customer form.
In short, I need the admin to be able to change background image of the form by selecting it from the media library.
Button looks like this:
<button>Select Image</button>
Customer form (preview end):
<div id="giftcardForm" style="position:relative;">
<img src="url" id="background img" style="width:100%; height:auto; z-index:0;">
<div style="position:absolute; top:$from_y; left:$from_x; width:auto;" id="printname"></div>
<div style="position:absolute; top:20%; left:$from_x; width:auto;" id="print_to_name"></div>
<div style="position:absolute; top:30%; left:$from_x; width:auto;" id="showtext"></div>
</div>