Skip to content

Instantly share code, notes, and snippets.

@kirillrocks
Last active February 7, 2017 16:45
Show Gist options
  • Save kirillrocks/c57195db3dadcc54d97272d6687b35be to your computer and use it in GitHub Desktop.
Save kirillrocks/c57195db3dadcc54d97272d6687b35be to your computer and use it in GitHub Desktop.
<?php
$form = new CJLP_Form();
$form->process_form(); // A MUST
?>
<h2>Plugin Name </h2>
<?php echo $form->start_form(); ?>
<label for="input_field">Input Field</label>
<?php echo $form->input( 'input', ['name' => 'input_field', 'id' => 'input_field'] ); ?>
<br />
<label for="checkbox">Checkbox Field</label>
<?php echo $form->input( 'checkbox', ['name' => 'checkbox', 'id' => 'checkbox'] ); ?>
<br />
<label for="select">Select Field</label>
<?php echo $form->select( ['option1' => 'Option 1', 'option2' => 'Option 2'], ['name' => 'select', 'id' => 'select'] ); ?>
<br />
<label for="textarea">Textarea Field</label>
<?php echo $form->textarea( ['name' => 'textarea', 'id' => 'textarea'] ); ?>
<br />
<label for="wordpress">Wordpress Editor Field</label>
<?php echo $form->input( 'wpeditor', ['name' => 'wpeditor', 'id' => 'editor'] ); ?>
<br />
<label for="media">Choose Image</label>
<?php echo $form->input( 'media', ['name' => 'media', 'id' => 'media'] ); ?>
<br />
<?php echo $form->end_form(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment