changed action so that it works on frontend
use proper sanitization