Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active April 18, 2017 16:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/97f2f40879a6dea6e47c to your computer and use it in GitHub Desktop.
Save billerickson/97f2f40879a6dea6e47c to your computer and use it in GitHub Desktop.
Move zip field next to state in WPForms
jQuery(function($){
// Move zip in form
$('.wpforms-field-address').each(function(){
var $this = $(this),
$zipField = $this.find('.wpforms-field-row-block').last(),
$thirdRow = $this.find('.wpforms-field-row:nth-last-child(2)');
$zipField.appendTo($thirdRow).removeClass('wpforms-first');
$thirdRow.find('.wpforms-one-half').toggleClass('wpforms-one-half wpforms-one-third');
$this.find('.wpforms-field-row').last().remove();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment