Skip to main content
replaced http://craftcms.stackexchange.com/ with https://craftcms.stackexchange.com/
Source Link

I created a plugin settings page following the example shown herehere but my entries need to include multilines (they are email bodies). My Twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and I don't think it works (doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?

I created a plugin settings page following the example shown here but my entries need to include multilines (they are email bodies). My Twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and I don't think it works (doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?

I created a plugin settings page following the example shown here but my entries need to include multilines (they are email bodies). My Twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and I don't think it works (doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?

added 2 characters in body
Source Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

iI created a plugin settings page following the example shown here but my entries need to include multilines  (they are email bodies). my twigMy Twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and iI don't think it works  (doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?

i created a plugin settings page following the example shown here but my entries need to include multilines(they are email bodies). my twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and i don't think it works(doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?

I created a plugin settings page following the example shown here but my entries need to include multilines  (they are email bodies). My Twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and I don't think it works  (doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?

Source Link

Plugin settings multiline input field

i created a plugin settings page following the example shown here but my entries need to include multilines(they are email bodies). my twig template for the settings page is like this:

{% import "_includes/forms" as forms %}

{{ forms.textField({
    label: "Submitted Subject"|t,
    id: 'submittedSubject',
    name: 'submittedSubject',
    instructions: "Input your setting"|t,
    value: settings.submittedSubject,
    errors: settings.getErrors('submittedSubject'),
    })
}}

(this field is repeated 6 times). I tried using textAreas instead of textFields, but it doesn't have the same options and i don't think it works(doesn't have a value field). Also it doesn't help that there's barely any documentation for this. Is there a way for me to have multiline text inside the text field?