0

I am trying to access the form values of hidden fields so I can set them or retrieve them.

I tried the form.field_with() method as well as just form.fieldname and cannot figure out how to get a reference back for a hidden field.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
xMythicx
  • 827
  • 1
  • 11
  • 27

1 Answers1

3

In general you just do:

form['foo'] = 'bar'

That goes for all kinds of form fields, not just hiddens.

pguardiario
  • 53,827
  • 19
  • 119
  • 159