<p>You can use the <a href="https://solspace.com/craft/freeform/docs/freeform.form/#param-overridevalues" rel="nofollow noreferrer"><code>overrideValues</code> parameter</a> to set field values automatically and dynamically. E.g.</p>

<pre><code>{{ craft.freeform.form("composerForm", {
    labelClass: "form-label",
    inputClass: "form-control",
    overrideValues: {
        myFieldHandle: entry.title,
        myOtherField: craft.app.request.getSegment(3),
    }
}).render() }}
</code></pre>

CC BY-SA 4.0
2019-01-15T23:31:52.227Z
works a charm :)
Kev N
CC BY-SA 4.0
2019-01-14T20:04:26.257Z
2019-01-14T20:04:26.257Z
Solspace
<p>Using freeform on another CMS, I was able to pass the last segment of the previous page url (when navigating to the form page) to a form field in the freeform composer, is this feature possible in the Craft version? Or alternatively, would this be possible passing an entry title? Thanks</p>

<variable><plugin-freeform>
Pass last segment to solspace freeform field
# Pass last segment to solspace freeform field

(Asked by: username_0 on 2018-10-30)

Using freeform on another CMS, I was able to pass the last segment of the previous page url (when navigating to the form page) to a form field in the freeform composer, is this feature possible in the Craft version? Or alternatively, would this be possible passing an entry title? Thanks

**Tags:** variable, plugin-freeform

---

## 1 answers

### Answer by username_1 on 2019-01-14. Score: 0 | Accepted answer

You can use the overrideValues parameter to set field values automatically and dynamically. E.g.
{{ craft.freeform.form("composerForm", {
    labelClass: "form-label",
    inputClass: "form-control",
    overrideValues: {
        myFieldHandle: entry.title,
        myOtherField: craft.app.request.getSegment(3),
    }
}).render() }}

> **Comments:**
> **username_0**: works a charm :)  

---

