You are here

function whatsappshare_form in Whatsapp Share 7

Same name and namespace in other branches
  1. 7.3 whatsappshare.admin.inc \whatsappshare_form()
  2. 7.2 whatsappshare.admin.inc \whatsappshare_form()

Creating form which save whatsapp share data.

Parameters

array $form: Array form will contain information about whatsappshare_form data.

array $form_submit: Array get form values form submissions.

1 string reference to 'whatsappshare_form'
whatsappshare_menu in ./whatsappshare.module
Implements menu hook().

File

./whatsappshare.admin.inc, line 15
Provides the Whatsappshare' administrative interface.

Code

function whatsappshare_form($form, &$form_submit) {
  $form['button_text'] = array(
    '#title' => t('Button Text'),
    '#type' => 'textfield',
    '#description' => t('Insert your Whatsapp share button text.'),
    '#default_value' => variable_get('whatsappshare_button_text', t('Share on whatsapp')),
    '#required' => TRUE,
  );
  $form['button_size'] = array(
    '#title' => t('Button Size'),
    '#type' => 'select',
    '#description' => t('Select the Button Size.'),
    '#options' => array(
      'wa_btn_s' => t('Small'),
      'wa_btn_m' => t('Medium'),
      'wa_btn_l' => t('Large'),
    ),
    '#default_value' => variable_get('whatsappshare_button_size', t('Small')),
  );
  $form['sharing_text'] = array(
    '#title' => t('Sharing text'),
    '#type' => 'textarea',
    '#description' => t('Insert Sharing text.'),
    '#required' => TRUE,
    '#cols' => 60,
    '#rows' => 5,
    '#default_value' => variable_get('whatsappshare_sharing_text', t('Your sharing text will come here.')),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}