Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

93
Visualizações
redirect after click submit

I have a page on WordPress, that has a button and when the user clicks this button it will save the page, and the link change to the page link.

What I want is to make the user redirect to another page URL after clicking this button and the page gets saved.

these are the buttons, but I want to make the redirect work on both or only the Submit for Review button.

<?php do_action( 'tutor/dashboard_course_builder_form_field_after', $post ); ?>

                            <div class="tutor-form-row tutor-form-submit">
                                <div class="tutor-form-col-12">
                                    <div class="tutor-form-group">
                                        <div class="tutor-form-field tutor-course-builder-btn-group">
                                            <button type="submit" class="tutor-button btn-save-as-draft"
                                                    name="course_submit_btn"
                                                    value="save_course_as_draft"><?php esc_html_e( 'Save course as draft', 'edumall' ); ?></button>
                                            <?php if ( $can_publish_course ) :  ?>
                                                <button class="tutor-button tutor-success" type="submit"
                                                        name="course_submit_btn"
                                                        value="publish_course"><?php esc_html_e( 'Publish Course', 'edumall' ) ; ?></button>
                                            <?php else : ?>
                                                <button class="tutor-button tutor-success" type="submit"
                                                        name="course_submit_btn"
                                                        value="submit_for_review"><?php esc_html_e( 'Submit for Review', 'edumall' );  ?></button>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In PHP redirections are handled by the header() function, in the form:

header("Location: http://www.example.com/");

But make sure you are editiog the PHP file that proccess the form data (the action attibute probabily is pointing to the file). Note that the "header()" function will redirects the page before any output and no content outputed from the page will display. You can check other strategies at the function documentation page.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda