0

I would like a channel form return path to open in a new window upon submission. Is there any way to do this? Below is the template code I have:

{exp:channel:entries channel="projects" entry_id="{last_segment}" limit="1"}
                        <h2>{title}</h2>
                        <ul class="buttons">
                            {project_proof orderby="row_id" sort="desc" limit="1"}
                                <li>
                                    {exp:channel:form
                                        channel="projects"
                                        entry_id="{last_segment}"
                                        return="images/uploads/proofs/{proof_file:filename}.{proof_file:extension}"
                                        orderby="row_id"
                                        sort="desc"
                                        limit="1"
                                        target="_blank"
                                    }
                                    <input type="hidden" name="field_id_77[row_order][]" value="row_id_{row_id}" />
                                    <input type="hidden" name="field_id_77[row_id_{row_id}][col_id_19]" value="{current_time format='%F %d, %Y - %g:%i:%s'}" />
                                    <input type="hidden" name="field_id_77[row_id_{row_id}][col_id_15]" value="{proof_date}" />
                                    <input type="hidden" name="field_id_77[row_id_{row_id}][col_id_18]" value="{proof_notes}" />
                                    <button class="button" type="submit">View details</button>
                                    {/exp:channel:form}
                                </li>

                                <li><a class="button" id="submitChanges">Submit changes</button></a></li>
                            {/project_proof}
                        {/exp:channel:entries}

Basically it returns an image so I want to have that image either open in a new window or download. Thanks!

2

This is a job for JavaScript. Here's a thread over at the main Stack Exchange questions forum which may be useful:- https://stackoverflow.com/questions/3825078/jquery-post-response-in-new-window

1
  • I am not sure this will work. I am editing my post with the data I have on the site. There are multiple forms on this template, but I could just not know what I am doing.
    – prosborne
    Jan 1 '14 at 22:11

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.