Generate and Send Invoice Number to Authorize.Net

/* * Include an invoice number into the set of Authorize.Net args. * * @link https://wpforms.com/developers/how-to-send-an-invoice-number-through-to-authorize-net-payments */ function wpf_dev_authorize_net_process_payment_single_add_invoice_to_args( $args, $process ) { // Replace 20 in $process->fields[20] to an id of your invoice field. if ( isset( $process->fields[20][ ‘value’…Continue reading

CSS for Countdown Timer text

html div#om-{{id}} .{{ns}}-CountdownElement–wrapper .{{ns}}-days .unit-days, html div#om-{{id}} .{{ns}}-CountdownElement–wrapper div.{{ns}}-hours .unit-hours, html div#om-{{id}} .{{ns}}-CountdownElement–wrapper div.{{ns}}-minutes .unit-minutes, html div#om-{{id}} .{{ns}}-CountdownElement–wrapper div.{{ns}}-seconds .unit-seconds { display: none; } html div#om-{{id}} .{{ns}}-CountdownElement–wrapper div.{{ns}}-days:after { content:’DAYS’; display: block; font-size: 13px; } html div#om-{{id}} .{{ns}}-CountdownElement–wrapper div.{{ns}}-hours:after {…Continue reading

Disable Inspector Tabs

add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading

Setting the Default Address Scheme to International

/* * Change the scheme for the address field * * @link https://wpforms.com/developers/how-to-set-the-address-default-scheme-to-international */ function wpf_dev_field_new_default( $field ) { // default scheme set to international if ($field[ ‘type’ ] === ‘address’) { $field[ ‘format’ ] = ‘international’; $field[ ‘scheme_selected’ ]…Continue reading

Adding Material Design to Your Form Fields Using CSS

#wpforms-form-697 { float: left; width: 100%; text-align: center; margin: 30px auto 30px auto; } #wpforms-form-697 .wpforms-field { margin-left: auto; margin-right: auto; max-width: 300px; margin-bottom: 15px; position: relative; } #wpforms-form-697 .wpforms-field input, #wpforms-form-697 .wpforms-field textarea { position: relative; display: block; width:…Continue reading

How to Add Material Design to Your Form Fields Using CSS

/** * Move label position from above form field to below * * @link https://wpforms.com/developers/how-to-add-material-design-to-your-form-fields-using-css/ */ function wpf_dev_display_field_before( $field, $form_data ) { // Only run this snippet on form ID 697 if ( absint( $form_data[ ‘id’ ] ) !== 697…Continue reading

Creating a Form With Floating Labels

form#wpforms-form-1682 { position: relative; } form#wpforms-form-1682 .floating label:nth-of-type(2) { display: none; } .floating input { position: relative; min-height: 65px; padding: 15px 10px 10px 15px !important; } .floating textarea { position: relative; min-height: 200px; padding: 35px 15px 15px 15px !important; }…Continue reading