0

Is there a way to pull the channel entry title from a previous page into a Freeform Pro form field?

Here's the specific scenario:

There is a channel containing job postings. To apply for any of these jobs, the visitor clicks an "apply" button which takes him or her from the job description page to an application form. Is there a way to pull the entry title of the job on the previous page to a field on the form the visitor is now filling out?

If there is a way to do this, can the code be integrated into a Composer template?

1

In the page with your job ad, you can use the url_title of the currently viewed job ad in the link to your freeform url.

So say you have a job entry with the url title of 'web-designer', your apply now button could link to domain.com/job/apply/web-designer.

In this example, 'job' is the template group, 'apply' is your template with your freeform form. Within the freeform tags you can then use a channel entries tag to get the {title} for your form field based on {segment_3}, looking something like this...

{exp:channel:entries channel="jobs" url_title="{segment_3}"}
<input type="text" name="position-applied-for" value="{title}">
{/exp:channel:entries}

Not sure if this can included in a composer template though.

1
  • You can also pass segment_3 to an extra hidden form field for inclusion / processing in the notification templates.
    – GDmac
    Dec 16 '13 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.