there's quite a bit of code duplication here. Consider validating the form and getting the data out of it and _then_ deciding what to call depending on 'create_item' vs 'edit_item'