0

I have a Freeform Pro form that emails the acceptance of a print proof. Right now it is just sending an email, but I would like it to also set the Validate Proof channel field to Yes. I have a hidden field with the value, but I am not sure how to submit that value to the channel entry on submit.

Here is my field code:

{exp:channel:entries channel="projects" entry_id="{segment_3}" class="new-project"}
             {exp:freeform:form
                form_name="approval_to_print"
                require_captcha="no"
                return="/client/client_area"
                notify_admin="yes"
                notify=" {project_client_name}{sales_rep show="email"}{/project_client_name}"
            }

             <div class="projectHeader">
                <header>
                {if project_approval == 'Yes'}
                    <h2>This proof has been approved and cannot be updated</h2>
                {if:else}
                    <h2>Submit Approval</h2>
                {/if}
                </header>
            </div> <!-- /.projectHeader -->
            <div class="section">
                <section>
                    <div class="contentWrap twoCols">
                        <div class="col">
                            <div class="section">
                                <section>
                                <p><strong>PROOF ALL CONTENT.</strong> Check all of the content - text, numbers and graphics – on your project for accuracy. You are responsible for proofing all of the content, including content that was not marked for changes. Check each feature on the list below, making sure each element is correct and looks as you would like it to appear.</p>
                                    <div class="field"> 
                                        <span class="label">{freeform:label:logos_and_photos} </span>
                                        {freeform:field:logos_and_photos}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:yardages_and_totals} </span>
                                        {freeform:field:yardages_and_totals}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:handicaps_and_pars} </span>
                                        {freeform:field:handicaps_and_pars}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:rating_slopes} </span>
                                        {freeform:field:rating_slopes}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:staff_names_and_titles} </span>
                                        {freeform:field:staff_names_and_titles}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:map_graphics_including_hole_numbers} </span>
                                        {freeform:field:map_graphics_including_hole_numbers}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:rules_and_regulations} </span>
                                        {freeform:field:rules_and_regulations}
                                    </div> <!-- /.field -->
                                    <div class="field"> 
                                        <span class="label">{freeform:label:contact_information_including_phone_numbers} </span>
                                        {freeform:field:contact_information_including_phone_numbers}
                                    </div> <!-- /.field -->
                                    <br>
                                    <p><strong>OPTIONAL COMMENTS FOR PRODUCTION.</strong> If you have changes to make, please use the Change Form on the previous page, or contact your rep at 800.238.7267. If you have any final comments that do not involve making changes to the proof, please include them below.</p>
                                    <br>
                                    <div class="field">
                                        <span class="label"><label for="project-notes">Optional Comments:</label></span>
                                        {freeform:field:user_message}
                                    </div> <!-- /.field -->
                                    <br>
                                    <p><strong>3. CLICK ON THE SUBMIT APPROVAL TO PRINT BOX BELOW.</strong></p>

                                    <div class="buttons">
                                        <input type="hidden" name="client_name" value="{title}">
                                        {client_project}
                                        <input type="hidden" name="project_name" value="{title}">
                                        <input type="hidden" name="quantity" value="{project_quantity}">
                                        <input type="hidden" name="size" value="{project_size}">
                                        <input type="hidden" name="features" value="{project_features}">
                                        {/client_project} 
                                        <button type="submit" name="submit" class="button large">Send File</button>
                                    </div> <!-- /.buttons -->
                                </section>
                            </div> <!-- /.section -->
                        </div> <!-- /.col -->
                        <div class="col last">
                            <div class="sidebar">
                                <aside>
                                    <p>Note: By submitting this form, you acknowledge that all of the content on this final proof is correct. Content on printed project will be the same as this proof. Golf Scorecards, Inc. is not responsible for errors on the printed piece if you have not indicated corrections using our Change Form. </p>
                                </aside>
                            </div> <!-- /.sidebar -->
                        </div> <!-- /.col -->
                    </div> <!-- /.contentWrap -->
                </section>
            </div> <!-- /.section -->
            {/exp:freeform:form}  
        {/exp:channel:entries}

Thanks in advance for any help!

2
  • Freeform is purely a sending thing. What you're looking to do used to be called safecracker - the 2 are mutually exclusive. You need to edit the channel entry then fire off an email .... unless I'm missing something. – stuartmcd69 Oct 30 '13 at 5:41
  • @stuartmcd69, your comment is a good answer. Why not post it below as an answer? :) – Stephen Callender Oct 30 '13 at 15:12
0

Another potential solution is to use the Safecracker/Channel Form tag outside of the Freeform tag and use some jQuery to submit both forms when the submit button is clicked, so that the channel field is updated as well as the the form sent.

You'll need to make sure the forms are submitted with AJAX so you can ensure that both are completed submitting before redirecting the user.

0

Freeform is purely a sending thing.

What you're looking to do used to be called safecracker (its just been renamed to something I can't recall ATM) - the 2 are mutually exclusive.

You need to edit the channel entry then fire off an email .... unless I'm missing something

1
  • I agree that Safecracker, now called Channel Form would be more ideal for this. You would simply set up your proofs in a channel, and allow the front-end to toggle the approval field via channel form. – Jeremy Gimbel Oct 31 '13 at 3:00

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.