New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Variables within Raven Form tags not parsing

Wes Manley September 17, 2014 by Wes Manley

I've set up a Raven form with variable tags within it and they are not parsing. The variables outside of the form work fine. Is there anything I need to do differently to use variables within a Raven form?

{{ raven:form
    <div class="form-row">
        <label for="firstName">First Name <em class="form-required">*</em></label>
        <input type="text" name="firstName" id="firstName" class="form-required">
    <div class="form-row">
        <label for="lastName">Last Name <em class="form-required">*</em></label>
        <input type="text" name="lastName" id="lastName" class="form-required">
    <div class="form-row">
        <label for="companyName">Company Name</label>
        <input type="text" name="companyName" id="companyName">
    <div class="form-row">
        <label for="email">Email <em class="form-required">*</em></label>
        <input type="text" name="email" id="email" class="form-required">
    <div class="form-row">
        <label for="phoneNumber">Phone Number</label>
        <input type="text" name="phoneNumber" id="phoneNumber">
    {{ if show_download }}
        <div class="form-row">
            <input type="checkbox" name="download" id="download">
            <label for="download">{{ download_text }}</label>
    {{ endif }}
    <div class="form-row">
        <input type="checkbox" name="contactMe" id="contactMe">
        <label for="contactMe">Please call me</label>
    <button type="submit" class="btn-form">{{ form_button_text }}</button>
{{ /raven:form }}
Answered by Jason Varga!
>>>>>>> Answered <<<<<<<
6 Replies