Jump to content

FormTemplateProcessor and FieldTypeOptions issue


Kiwi Chris
 Share

Recommended Posts

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|label

Even 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

  • 4 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...