save

CakePHP 3 Tutorial 19: Display One Thing, Save Another

Submitted by naidim on Tue, 10/25/2016 - 13:37

There may come a case, as in the previous tutorial (CakePHP 3 Tutorial 18: Autocomplete) that you want to display one thing in a form field, yet save a different value. In the previous case, you select a user's name from an autocomplete list, yet the user's id is the value you want to save in the database.