get and write selected value to the hidden input field
removed the get images method body