Kiwi Chris Posted March 20, 2016 Share Posted March 20, 2016 the FormTemplateProcessor module generally works well for what I need it for, but when it comes to FieldTypeOptions, fields, the index is what shows up when emailing a form. I've tried the following, but it doesn't fix it: if($field->type instanceof FieldtypeOptions){ $value = htmlentities($this->contact->get($field->name)->title); }else{ $value = htmlentities($this->contact->get($field->name)); } In documentation for FieldTypeOptions is says that it's possible to assign a value like this: 1=value|labelEven if I do, I don't seem to be able to get the value to display, and only the index number is returned in the email whether I use $this->contact->get($field->name)->title or $this->contact->get($field->name)->value Where am I going wrong? Link to comment Share on other sites More sharing options...
strandoo Posted August 20, 2016 Share Posted August 20, 2016 Hi Kiwi Chris. Did you ever solve this? I've got the same problem and have tried similar things with no luck. Any enlightenment would be useful. thanks. Link to comment Share on other sites More sharing options...
strandoo Posted August 20, 2016 Share Posted August 20, 2016 UPDATE: I just tried Kiwi Chris's code and it worked fine for me. I had previously used $this->contact->get($field->name->title) instead of this $this->contact->get($field->name)->title which worked. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now