modify displayed field prior to saving
modify displayed field prior to saving
hbanaharis
Posts: 32Questions: 14Answers: 3
in Editor
I use a an editField function to modify the contents of a column prior to displaying. How can I modify the contents prior to saving?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you using any of our server-side libraries? They all have the concept of “set formatters” (e.g. for PHP) which can be used to transform the value in some way before writing to the database.
Allan
no but the application relates to addressing a field whose content when received from database is words separated by commas. Currently using render on columns to convert commas to spaces and would like to replace the spaces with commas when writing back to database, i.e:
You can use the
preSubmit
orajax.data
interfaces in Editor to modify the data that is being sent to the server, which would work in this case with a little regex.However, if you have the ability to change the server-side code (?) then that is where I would put the formatter myself.
Allan