Add ajax functionality to create