Skip to content

Instantly share code, notes, and snippets.

James Laws jameslaws

View GitHub Profile
@jameslaws
jameslaws / guesthost_mastermindfm.md
Last active Jan 10, 2017 — forked from jcasabona/howibuit.md
Guest Notes for Mastermind.fm Podcast
View guesthost_mastermindfm.md

Guest Notes for Mastermind.fm Podcast

Format

We will pick a topic from the ones suggested by you and have an open discussion in a typical mastermind fashion. The target is a 30 to 45 minute show that's pretty focused. A typical show will be as follows:

Jean or James will introduce you and the topic and dive right into discussion.

Questions

@jameslaws
jameslaws / nf-hide-asterisk.css
Created Oct 10, 2016
How do I hide the asterisk on required fields
View nf-hide-asterisk.css
.ninja-forms-req-symbol {
display: none;
}
@jameslaws
jameslaws / hide-all-fields-required-mesage.css
Last active Nov 11, 2016
How do I hide the "All fields marked with an * are required" message
View hide-all-fields-required-mesage.css
.nf-form-fields-required {
display: none;
}
@jameslaws
jameslaws / nf-css-field-element.css
Created Oct 5, 2016
Styling the Field Element of a Ninja Form
View nf-css-field-element.css
/*
Styling all field elements
*/
.ninja-forms-field {
/* Your CSS styles */
}
/*
Styling a field type element
EXAMPLE: .textbox-wrap .ninja-forms-field {}
@jameslaws
jameslaws / nf-css-field-label.css
Created Oct 5, 2016
Styling the Field Label of a Ninja Form
View nf-css-field-label.css
/*
Styling all field labels
*/
.field-wrap label {
/* Your CSS styles */
}
/*
Styling a field type labels
EXAMPLE: .textbox-wrap label {}
@jameslaws
jameslaws / nf-css-field-wrap.css
Created Oct 5, 2016
Styling the Field Wrap of a Ninja Form
View nf-css-field-wrap.css
/*
Styling all field wraps
*/
.field-wrap {
/* Your CSS styles */
}
/*
Styling a field type wrap
EXAMPLE: .textbox-wrap {}
*/
@jameslaws
jameslaws / nf-css-field-container.css
Created Oct 5, 2016
Styling the Field Container of a Ninja Form
View nf-css-field-container.css
/*
Styling all field containers
*/
.nf-field-container {
/* Your CSS styles */
}
/*
Styling a field type container
EXAMPLE: .textbox-container {}
*/
@jameslaws
jameslaws / nf-field-markup.html
Last active Oct 4, 2016
Ninja Forms Example Field Markup
View nf-field-markup.html
<div class="nf-field-container {field-type-name}-container label-above">
<div class="nf-before-field">
<nf-section></nf-section>
</div>
<div class="nf-field">
<div id="nf-field-{field_id}-wrap" class="field-wrap {field-type-name}-wrap" data-field-id="{field_id}">
<div class="nf-field-label">
<label for="nf-field-{field_id}" class="">Single Line Text</label>
</div>
<div class="nf-field-element">
@jameslaws
jameslaws / get_form_id_name.php
Created Nov 18, 2015
Ninja Forms - Get all form IDs and Names
View get_form_id_name.php
<?php
$forms = Ninja_Forms()->form()->get_forms();
foreach ( $forms as $form ) {
$form_id = $form->get_id();
$form_name = $form->get_setting( 'title' );
// Do more stuff
}
@jameslaws
jameslaws / ninja-forms-remove-add-new.php
Created Oct 28, 2015
Remove the Ninja Forms Add New Form button from wp_editor if non-admin
View ninja-forms-remove-add-new.php
<?php
function example_remove_add_new( $instance ) {
if ( ! current_user_can( 'manage_options' ) ) {
remove_filter( 'media_buttons_context', array( $instance->add_form_button, 'insert_form_tinymce_buttons' ) );
}
}
add_action( 'nf_admin_init', 'example_remove_add_new' );
You can’t perform that action at this time.