Set field value with $COOKIE
Set field value with $COOKIE
![julesverne](https://secure.gravatar.com/avatar/49c18691eea7ec299eafe14b5def117f/?default=https%3A%2F%2Fvanillicon.com%2F49c18691eea7ec299eafe14b5def117f_200.png&rating=g&size=120)
Is possible to set field value from COOKIE value?
Something like this
$editor->field(
new Field( 'userid' )
->setValue($_COOKIE['name'])
);
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yes, you should be able to use it exactly as you have it above. The
Field->setValue()
method doesn't really "care" about where the data comes from - as long as it gets data.Allan
Ok, thanks Allan