PHP getValue usage
PHP getValue usage
Hi @all
Hope everybody is fine
Happy new next actual year
Question
I can use
$editor->Field('FieldName')->setValue($ValueToSet);
But how to get an editor field value, for example in preCreate php event ?
I did lot of unsuccessfull try but nowhere succès...
I hope to get value like :
$ValueToGet = $editor->Field('FieldName')->getValue();
Some idea ?
Thanks and be safe
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Field->getValue()
will just set the value that the field will be given when the data is read from the server.If you want to get the value of the field being edited in the
preCreate
server-side event, use the$values
array that is passed into thepreCreate
event - docs. e.g.:Allan
Hi @allan...
Of course... So simple.
Thanks