Set id for select elements created dynamicaly created
Fix #3283, use jQuery to change attributes based on id