Skip to content

Instantly share code, notes, and snippets.

View dominikgraef's full-sized avatar

Dominik dominikgraef

  • Cologne, Germany
  • 23:21 (UTC +01:00)
View GitHub Profile
@Qubadi
Qubadi / gist:9ed8cfff87d68493c71431a8d2226994
Last active August 6, 2025 17:50
Jetformbuilder rename post-submit action labels
UPDATED: 06.08.2025
I've developed a custom code for JetFormBuilder post-submit action, which allows you to easily edit the label name,
something that's not possible by default in JetFormBuilder.
Copy the following PHP and create a PHP snippet using your snippet plugins.
Paste the code into the plugin and save it.
___________________________-
<?php
@Qubadi
Qubadi / gist:3c12e21d4572ca9fae05670169e8a455
Last active August 11, 2025 17:00
JetFormBuilder form validation with disabled submit button
UPDATED: 11.08.2025
It checks to see if a JetFormBuilder form has all required fields filled.
If any of them are missing, the submit button is disabled, and this prevents their submission.
The button activates again when all fields are complete.
Copy the following PHP code and create a PHP snippet using your snippet plugins.
Paste the code into the plugin and save it.
________________________________________
@Lonsdale201
Lonsdale201 / code
Created November 10, 2024 11:47
JetEngine - FluentBoards - SQL Query
// This SQl Query For the user who is logged in, it will retrieve all the Boards to which it is assigned.
// Create a new JetEngine Query, with the Query builder. Set the Query type to SQL/AI Query
// Turn on the Advanced/AI mode switcher
// in the SQL Query Area, paste the code
// In the Cast result to instance of object -- Keep stdClass
// You can use the results like jetformbuilder etc..
SELECT fbs_boards.*
FROM {prefix}fbs_boards AS fbs_boards
JOIN {prefix}fbs_relations AS relations ON fbs_boards.id = relations.object_id
@Lonsdale201
Lonsdale201 / code
Created November 7, 2024 10:13
JetEngine - ACF Date Picker custom callback
// place the code in the child theme functions.php or a custom code snippets plugin, like FluentSnippets
// This code work very well with the ACF Date Picker field type. Will return the corrected date format
// You will see the new ACF Date option in the Filter Callback list
// You need to overwrite the date output format in the code
// https://www.advancedcustomfields.com
add_filter( 'jet-engine/listings/allowed-callbacks', 'add_acf_date_callback' );
add_filter( 'jet-engine/listing/dynamic-field/callback-args', 'add_acf_date_callback_args', 10, 3 );
@Qubadi
Qubadi / gist:b918070aaf15f1e48b0b2ad9baeeb117
Last active September 25, 2025 06:55
JetFormBuilder that allows users to crop images with some great new functionality
UPDATED: 29.09.2024
Copy the following HTML code and create a HTML snippet using your snippet plugins.
Paste the code into the plugin and save it.
I’ve developed a new custom feature for JetFormBuilder that allows users to crop images with some great new functionality.
Here’s a quick rundown of what it does:
JetFormBuilder integration: This custom code integrates seamlessly with JetFormBuilder’s file upload system, making the image
inputs interactive and ready for cropping, all through a custom action hook.
@Lonsdale201
Lonsdale201 / code
Last active December 26, 2025 02:36
JetFormBuilder - Check ajax submit success or other status
// place the code in the child theme functions.php or a custom code snippets plugin like FluentSnippets
// if you want to handle other error statuses, change "invalid_email" to the one you want to monitor.
document.addEventListener( 'DOMContentLoaded', function() {
const { addAction } = window.JetPlugins.hooks;
addAction( 'jet.fb.observe.after', 'test/onSubmit', init );
function init( observable ) {
observable.form.submitter.status.watch( onFormSubmit );
@Qubadi
Qubadi / gist:5793d9bd3fbc996fb35cee7e50031f33
Last active November 7, 2025 16:43
Jetformbuilder customize the Choose File and drag-and-drop of images
UPDATED: 04.11.2024
Copy the following HTML code and create a HTML snippet using your snippet plugins.
Paste the code into the plugin and save it.
Don't forget to add MIME types (image formats), for example, PNG and JPEG, in the media field where it shows 'Allow MIME types.
______________________________________________________
<style>
/* Custom styles for the file upload field */
.jet-form-builder__field-wrap.jet-form-builder-file-upload {
@hazratbilal0079
hazratbilal0079 / CSS
Created September 23, 2024 11:50
Inline Editing of CPT or CCT using bricks or Elementor
#inlinetrytable {
width: 100%;
border-collapse: collapse;
}
#inlinetrytable th, #inlinetrytable td {
padding: 10px;
border: 1px solid #ddd;
text-align: left;
}
@Lonsdale201
Lonsdale201 / code
Created August 17, 2024 18:17
JetEngine - Dynamic visibility - Check Url Path
// place the code in the child theme functions.php or a custom code snippets plugin.
// Open an widget, dynamic visibility, and search the Check Url Path visibility under the Custom category.
// This visibility condition function checks whether the specified text is present in the current page's URL. For example:
// example.com/test/test2
// If you specify "test2" in the visibility settings (value field), the rule will be applied whenever "test2" is found anywhere in the current page's URL.
add_action( 'jet-engine/modules/dynamic-visibility/conditions/register', function( $conditions_manager ) {
@Qubadi
Qubadi / gist:da08ced02431169768e558483c4bf099
Last active September 5, 2024 12:02
Enhanced input fields with clear button for JetFormBuilder
Updates Made 31.08.2024:
Used input.onClear(): This method is used to clear the input field when available.
Checked for Input Type: Added a check to skip adding the clear button for checkbox and radio input types to avoid issues.
Description:
Copy the following HTML code and create a HTML snippet using your snippet plugins. Paste the code into the plugin and save it.
This code enhances the input fields in JetFormBuilder forms by adding a clear button that allows users to easily clear the input content.
The clear button appears when there is input and disappears when the input is empty. It also includes a smooth hover effect for the
clear button, changing its background and font colors.