I have a form which was built using composer - there is about 12 fields in it and at the minute if completed without a required field or there is an error in the form the form is loaded again blank to complete. What is the best way to retain those values or is it best with some sort of validation?

Form code below:

    form:class="form-horizontal contact-form"
    <div class="ff_composer">
            <div class="line">
                <div class="unit size1of{composer:column_total}">
                {if composer:field_total == 0}

                {if composer:field_label}
                    {if composer:field_type == 'nonfield_captcha'}
                        {if captcha}
                        <label {if composer:field_name != ''}
                            {if composer:field_required}
                            <span class="required_item">*</span>
                {if composer:field_output}
                    {if composer:field_type == 'nonfield_title'}
                    {if:elseif composer:field_type == 'nonfield_captcha'}
                        {if captcha}
                                {captcha}<br />
                                    style="width:140px;" />

1 Answer 1


Someone raised this issue previously, the answer from Solspace at the time was no. I always submit via Ajax, then I can smoothly show errors, or feedback messages.

Although I stumbled across this question which indicates that values are stored in a {freeform:field:short_name} tag...? Not tried.

Another Solspace response.

Other solutions: Using JavaScript & PHP - the issue here is that Freeform posts to an ACT url, not the actual page, so wouldn't be able to use GET or POST back onto the same (return) page.

JQuery Cookie Plugin

localstorage (same link as above, 2nd answer)

JQuery Cookie

But to be honest, it'll be far easier to just use Ajax than any of the above.


Your Answer

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

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