<p>You'll need to access the properties individually like this, assuming you've set them on the Form object:</p>

<pre><code>{{ form.customAttributes.rowClass }}
{{ form.customAttributes.columnClass }}
{{ form.customAttributes.inputClass }}
Etc...
</code></pre>

<p><a href="https://solspace.com/craft/freeform/docs/form/#prop-custom-attributes" rel="nofollow noreferrer">https://solspace.com/craft/freeform/docs/form/#prop-custom-attributes</a></p>

CC BY-SA 4.0
2019-01-16T03:49:08.423Z
Roger that, what about properties set on the field object?
Philip Zaengle
CC BY-SA 4.0
2019-01-17T03:44:45.403Z
Can you think of a use-case where you would apply attributes to a field but then render those manually? Or apply it to the field object instead of form object?
Solspace
CC BY-SA 4.0
2019-01-15T01:26:38.817Z
2019-01-15T01:26:38.817Z
Solspace
<p>Is it possible to access <code>customAttributes</code> on a FreeForm field? </p>

<p>Currently attempting to do this via:</p>

<pre><code>{% for row in form %}
  {% for field in row %}
    {{ dump(field.customAttributes) }}
  {% endfor %}
{% endfor %}
</code></pre>

<p>Where form is a FreeForm object.</p>

<p>Currently I'm getting an error that indicates that attribute does not exist or I can't access it. </p>

CC BY-SA 4.0
2019-02-13T12:07:38.197Z
> *Sorry this isn't a comment, i don't have enough rep to comment yet.* I'm having this issue right now. I need to show/hide a field's parent "row" based on another fields value (the rules in the conditional editor aren't thorough enough in this case). I've added an input attribute to a field that I want to control the row of but `field.inputAttributes` or `field.customAttributes.inputAttributes` isn't available like the docs [make it seem like it would be](http://docs.solspace.com/craft/freeform/v2/template-objects/field.html#prop-custom-attributes). Errors I'm seeing are Neither the property
Harry Harrison
<plugin-freeform><solspace>
FreeForm: Accessing a fields customAttributes
# FreeForm: Accessing a fields customAttributes

(Asked by: username_0 on 2019-01-14)

Is it possible to access customAttributes on a FreeForm field? 
Currently attempting to do this via:
{% for row in form %}
  {% for field in row %}
    {{ dump(field.customAttributes) }}
  {% endfor %}
{% endfor %}

Where form is a FreeForm object.
Currently I'm getting an error that indicates that attribute does not exist or I can't access it.

**Tags:** plugin-freeform, solspace

> **Comments:**
> **username_1**: > *Sorry this isn't a comment, i don't have enough rep to comment yet.* I'm having this issue right now. I need to show/hide a field's parent "row" based on another fields value (the rules in the conditional editor aren't thorough enough in this case). I've added an input attribute to a field that I want to control the row of but `field.inputAttributes` or `field.customAttributes.inputAttributes` isn't available like the docs [make it seem like it would be](http://docs.solspace.com/craft/freeform/v2/template-objects/field.html#prop-custom-attributes). Errors I'm seeing are Neither the property  

---

## 1 answers

### Answer by username_2 on 2019-01-15. Score: 1

You'll need to access the properties individually like this, assuming you've set them on the Form object:
{{ form.customAttributes.rowClass }}
{{ form.customAttributes.columnClass }}
{{ form.customAttributes.inputClass }}
Etc...

https://solspace.com/craft/freeform/docs/form/#prop-custom-attributes

> **Comments:**
> **username_0**: Roger that, what about properties set on the field object?  
> **username_2**: Can you think of a use-case where you would apply attributes to a field but then render those manually? Or apply it to the field object instead of form object?  

---

