1

I have created a Freeform field called title_tag and have set the type to "hidden". In the field config settings, when selecting "Hidden Field" as the type, the field options allows you to set the Default Incoming Data:

Allowed data are ExpressionEngine tags and brackets and special fields. All HTML will be removed from this setting.

As my form is a field type in my channel, I have set the default value to {title}

enter image description here

I have then added the field to my form:

enter image description here

However, the Title of the channel entry is not pulling through:

enter image description here

I'm assuming it's something simple that I've missed but can't seem to identify what I've done wrong and why the {title} tag isn't pulling in the Title as the value for the hidden input when it clearly says in the Field Options that this can be done.

VERSION DETAILS:

ExpressionEngine: 2.10.1
Freeform Pro: 4.2.3

1

1 Answer 1

2

Do you have anything in the URL that allows you to find the channel entry using {exp:channel:entries}? If so, you could use this and use the {exp:channel:entries} inside the hidden field to retrieve the entry title that is loading your Composer Freeform form.

For example, if you have your channel entry's ID in segment_3, you could put the following as the value of your Freeform hidden field:

{exp:channel:entries entry_id="{segment_3}" dynamic="no"}{title}{/exp:channel:entries}

There's no other way for Composer to "figure out" it's coming from a channel entry custom field (i.e. {title} on its own won't be enough).

4
  • What if the form tag is being rendered inside a {exp:channel:entries} tag already? Surely then it should be possible to pick up the entry's variables?
    – simonhamp
    Oct 23, 2015 at 11:31
  • Not if the form is loaded from the Channel Entry Freeform custom field. {exp:channel:entries} parses the Freeform custom field to Freeform form code, and Freeform then parses its form code: unfortunately {title} on its own then comes too late to be parsed.
    – Solspace
    Oct 28, 2015 at 11:53
  • In this case, the form isn't loaded from the Channel Entry Freeform custom field... it's 'manually' loaded in the template using Freeform template tags.
    – simonhamp
    Oct 28, 2015 at 13:33
  • So {exp:freeform:composer} inside {exp:channel:entries}? Can you post your code in your question/OP? Have you also tried using parse="inward" on {exp:freeform:composer} to see if the form can't be parsed first, with an unparsed {title}, and then that gets parsed by {exp:channel:entries}?
    – Solspace
    Nov 2, 2015 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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