Description
Show the "oik" contact formThis is a simple contact form which contains: Name, Email, Subject, Message and a submit button.
- Note: The * indicates Required field.
- If you want to make the fields responsive then try some CSS such as:
textarea { max-width: 100%; }
Usage
_bw_show_contact_form_oik( $atts, $user, $content );Parameters
- $atts
- ( array ) required – shortcode parameters
- $user
- ( mixed ) optional –
- $content
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-contact-form.phpLines:
1 to 32 of 32
function _bw_show_contact_form_oik( $atts, $user=null, $content=null ) { oik_require_lib( "bobbforms", "3.4.0" ); $class = bw_array_get( $atts, "class", "bw_contact_form" ); sdiv( $class ); bw_form(); if ( function_exists( bw_table_or_grid_start)) { bw_table_or_grid_start( empty($content) ); // Start a grid if fields are defined } else { stag( 'table' ); } if ( $content ) { _bw_show_contact_form_fields($atts, $content); } else { BW_::bw_textfield( bw_contact_field_full_name( "name" ), 30, __("Name *", "oik"), null, "textBox", "required"); BW_::bw_emailfield( bw_contact_field_full_name( "email" ), 30, __("Email *", "oik"), null, "textBox", "required"); BW_::bw_textfield( bw_contact_field_full_name( "subject" ), 30, __("Subject", "oik"), null, "textBox"); BW_::bw_textarea( bw_contact_field_full_name( "message" ), 30, __("Message", "oik"), null, 10); } if ( function_exists( bw_is_table)) { bw_table_or_grid_end(); bw_is_table( true ); } else { etag( 'table'); } e( wp_nonce_field( "_oik_contact_form", "_oik_contact_nonce", false, false )); oik_require_lib( "oik-honeypot" ); do_action( "oik_add_honeypot" ); bw_contact_form_submit_button( $atts ); etag( "form" ); ediv(); }View on GitHub View on Trac
Invoked by
Calls
1 to 15 of 15
- BW_::bw_emailfield() – Form an "email" field
- BW_::bw_textarea() – Form a "textarea" field
- BW_::bw_textfield() – Form a text field
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_contact_form_submit_button() – Create the submit button for the contact form
- bw_form() – Start a form
- bw_get_option_arr() – Retrieve the requested option value depending on the $atts array
- e() – Outputs some translated / non-translatable text
- ediv() – End a div
- etag() – Output an end tag
- ihidden() – Return a hidden input field for a form
- oik_require() – Invoke require_once on an oik include file or other file
- oik_require_lib() – Require a library
- sdiv() – Start a div
- stag() – Output an HTML opening tag
