Set field value with $COOKIE

Set field value with $COOKIE

julesvernejulesverne Posts: 5Questions: 2Answers: 0

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

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    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

  • julesvernejulesverne Posts: 5Questions: 2Answers: 0

    Ok, thanks Allan

This discussion has been closed.