<p>It looks like this isn't something that's currently possible. The code that generated the honeypot field isn't able to be extended <code>vendor/solspace/craft-freeform/src/Services/HoneypotService.php::240</code> </p>

<p>I ended up doing some js magic, like this:</p>

<pre><code>if(this.formHoneypotName) {
    let stickyFingers = form.target.querySelector('#' + this.formHoneypotName)
    params.append(this.formHoneypotName, stickyFingers.value ? stickyFingers.value : '')
}
</code></pre>

CC BY-SA 4.0
2020-01-13T18:32:06.210Z
2020-01-13T21:41:02.663Z
2020-01-13T21:41:02.663Z
Philip Zaengle
<p>I'm using VueJS too process and submit forms, and I would like to utilize the freeform honeypot functionality. The issue is that I am unable to add a <code>v-model</code> attribute to the honeypot field. </p>

<p>I've already got the CSRF token passing into the VueComponent without issue; I need to get an attribute onto the honeypot field. </p>

<p>Is there a way to do this out of the box?</p>

<plugin-freeform><solspace><freeform>
FreeForm: Adding attributes to the honeypot field
# FreeForm: Adding attributes to the honeypot field

(Asked by: username_0 on 2020-01-13)

I'm using VueJS too process and submit forms, and I would like to utilize the freeform honeypot functionality. The issue is that I am unable to add a `v-model` attribute to the honeypot field.

I've already got the CSRF token passing into the VueComponent without issue; I need to get an attribute onto the honeypot field.

Is there a way to do this out of the box?

**Tags:** plugin-freeform, solspace, freeform


---

## 1 answers

### Answer by username_0 on 2020-01-13. Score: 1 | Accepted answer

It looks like this isn't something that's currently possible. The code that generated the honeypot field isn't able to be extended vendor/solspace/craft-freeform/src/Services/HoneypotService.php::240 
I ended up doing some js magic, like this:
if(this.formHoneypotName) {
    let stickyFingers = form.target.querySelector('#' + this.formHoneypotName)
    params.append(this.formHoneypotName, stickyFingers.value ? stickyFingers.value : '')
}


---

