3

due to the nature of my project, I cannot use the standard freeform syntax:

    {freeform:field:short_name}

I instead have to use the following syntax:

    <div class="ui left aligned icon input">
        <input type="text" placeholder="Vor- Nachname" id="short_name" value="" name="short_name" required />   
        <i class="user icon"></i>
        <div class="ui corner label"><i class="asterisk icon"></i></div>
    </div>

It all works great - but If one omits something that triggers an error, the fields that were already filled in are blank.

I am looking to populate the value="" parameter with the things one entered before the error occurred.

e.g. value="{..._short_name}

is this possible?

btw: values are stored if you use the {freeform:field:short_name} syntax.

cheers stefan

2

After fiddling around I found an undocumented feature:

you can add almost all attributes within the standard field syntax. so this works:

    <label for="name">My Field Label</label>
    <div class="ui left aligned icon input">
        {freeform:field:my_field attr:placeholder="My Field Label" attr:id="my_field" attr:required="required"}
        <i class="user icon"></i>
        <div class="ui corner label"><i class="asterisk icon"></i></div>
    </div>

the attr:placeholder, attr:required were not documented, but work like they should! great!

1

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.