accomplish the checkbox and some function before post the data to database