Is it possible to differentiate between Create and Edit to apply different fieldinfo

Is it possible to differentiate between Create and Edit to apply different fieldinfo

tangerinetangerine Posts: 3,370Questions: 41Answers: 395

Is it possible to differentiate between Create and Edit so that I can apply different fieldinfo while using the same form for both?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 65,058Questions: 1Answers: 10,773 Site admin
    Answer ✓

    Sure thing! mode() can be used to determine what the current action is. However, it might be more useful to listen for initCreate and initEdit, and in the event handler for each, use field().info() to update the info for the field in question to be relevent for each action.

    Allan

  • tangerinetangerine Posts: 3,370Questions: 41Answers: 395

    That's lovely, Allan. Thank you so much.

Sign In or Register to comment.