GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
form-buttons.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @file form-buttons.php
4  * @global GravityView_Edit_Entry_Render $object
5  */
6 ?>
7 <div id="publishing-action">
8  <?php
9 
10  /**
11  * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL
12  * @since 1.11.1
13  * @param string $back_link Existing URL of the Cancel link
14  * @param array $form The Gravity Forms form
15  * @param array $entry The Gravity Forms entry
16  * @param int $view_id The current View ID
17  */
18  $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id );
19 
20  /**
21  * @action `gravityview/edit-entry/publishing-action/before` Triggered before the submit buttons in the Edit Entry screen, inside the `<div id="publishing-action">` container.
22  * @since 1.5.1
23  * @param array $form The Gravity Forms form
24  * @param array $entry The Gravity Forms entry
25  * @param int $view_id The current View ID
26  */
27  do_action( 'gravityview/edit-entry/publishing-action/before', $object->form, $object->entry, $object->view_id );
28 
29 
30  $labels = array(
31  'cancel' => __( 'Cancel', 'gravityview' ),
32  'submit' => __( 'Update', 'gravityview')
33  );
34 
35  /**
36  * @filter `gravityview/edit_entry/button_labels` Modify the cancel/submit buttons' labels
37  * @since 1.16.3
38  * @param array $labels Default button labels associative array
39  * @param array $form The Gravity Forms form
40  * @param array $entry The Gravity Forms entry
41  * @param int $view_id The current View ID
42  */
43  $labels = apply_filters( 'gravityview/edit_entry/button_labels', $labels, $object->form, $object->entry, $object->view_id );
44 
45  ?>
46  <input id="gform_submit_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" tabindex="4" value="<?php echo esc_attr( $labels['submit'] ); ?>" name="save" />
47 
48  <a class="btn btn-sm button button-small gv-button-cancel" tabindex="5" href="<?php echo esc_url( $back_link ); ?>"><?php echo esc_attr( $labels['cancel'] ); ?></a>
49  <?php
50 
51  /**
52  * @action `gravityview/edit-entry/publishing-action/after` Triggered after the submit buttons in the Edit Entry screen, inside the `<div id="publishing-action">` container.
53  * @since 1.5.1
54  * @param array $form The Gravity Forms form
55  * @param array $entry The Gravity Forms entry
56  * @param int $view_id The current View ID
57  */
58  do_action( 'gravityview/edit-entry/publishing-action/after', $object->form, $object->entry, $object->view_id );
59 
60  ?>
61  <input type="hidden" name="action" value="update" />
62  <input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry['id'] ); ?>" />
63 </div>
$labels
$back_link