Support

Account

Home Forums Front-end Issues Condition for two return urls for frontend submit

Unread

Condition for two return urls for frontend submit

  • Have a frontend form that has two conditional fields from a select field and I am trying to find a solution to each having separate submit return urls. My current form is

    <?php acf_form(array(
    	'field_groups' => array('1550'),
    	'instruction_placement'	=> 'label',
    	'post_title'	=> false,
    	'field_el' => 'div',
    	'return' => '%post_url%',
    	'html_before_fields' => '<div class="form-group">',
    	'html_after_fields' => '</div>',
    	'html_submit_button'	=> '<div class="submit-group"><input type="submit" style="float:left;" class="btn btn-orange" value="NEXT: Confirm"/> <span class="or">or</span> <a href="' . esc_url(get_permalink()) . 'edit-campaign-ads" class="back">Go back</a></div>'					
    )); ?>

    Is it possible to put an array() with conditions in 'return' => so that if select box chooses an option the field and submit button with url returns %post_url%/option1, whilst if option 2 is selected the field and submit button with url returns %post_url%/option2

Viewing 1 post (of 1 total)

The topic ‘Condition for two return urls for frontend submit’ is closed to new replies.