Sanitization callback for field

Hey, 

I reverted the inline js part and registering settings only on certain requests.