This issue is moot at this point as I've decided to not do this, but figured you may want to be aware of this.
I created a content type that I was then basing a Form off of for user-entered data. I'm using FlexiForm if it's of any help.
Anyway, if I put the token in the field of the CT, it appears fine in the Form (no extra config needed). HOWEVER, if I hide said field (in the Form) it throws an error. (this was a field holding a value for the IP of the current user) Here is the error:
Notice: Undefined index: default_value in field_default_token_default_value_function() (line 71 of [path]\sites\all\modules\field_default_token\field_default_token.module).
Warning: Invalid argument supplied for foreach() in field_default_token_default_value_function() (line 72 of [path]\sites\all\modules\field_default_token\field_default_token.module).
The odd thing was that if I then un-hid the field in the Form, it still gave the error until I removed the field in the Form (regardless of its visible state).
Comments
Comment #1
HunterElliott commentedComment #2
maximpodorov commentedIs your problem specific to FlexiForm?
Comment #3
HunterElliott commentedI've only tried using it when hiding a field in a FlexiForm, so I'm not sure if it's doing it in other places.
Comment #5
maximpodorov commentedThe fix is committed.