We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 488a530 commit dadd96eCopy full SHA for dadd96e
1 file changed
readme.md
@@ -89,6 +89,22 @@ wp_enqueue_script('wplf-form-js');
89
wp_localize_script( 'wplf-form-js', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
90
```
91
92
+### Client side callbacks
93
+
94
+WP Libre Form supports client side callbacks after form submission using window.wplf object. Example usage:
95
96
+```
97
+window.wplf.successCallbacks.push(function(response){
98
+ alert("You succesfully submitted form " + response.form_id);
99
+});
100
101
+window.wplf.errorCallbacks.push(function(response){
102
+ alert("Form submission failed!");
103
104
105
106
+These callbacks are executed in the order they appear.
107
108
### Add own css classes to form output
109
110
You can use the attribute xclass inside the shortcode to set own extra css classes.
0 commit comments