/**
  * @return string
  */
 private function make_field_question_type()
 {
     $key = FCA_FBC_Poll::FIELD_QUESTION_TYPE;
     $types = FCA_FBC_Poll::get_types();
     $first_type = current($types);
     return $this->make_field('select', $key, 'Question Type', array('options' => $types, 'selected' => $this->get_data($key, $first_type), 'after_content' => $this->make_info($this->make_field_question_type_info())), array('id' => 'fca_fbc_' . $key));
 }
 /**
  * @param $name
  *
  * @return string
  */
 private function make_field_display_frequency($name)
 {
     $key = FCA_FBC_Poll::FIELD_DISPLAY_FREQUENCY;
     return $this->make_field('select', $key, 'Display Frequency', array('options' => FCA_FBC_Poll::get_display_frequencies(), 'default' => $this->get_data($key, 'once'), 'after_content' => $this->make_info('Set how frequently to show the ' . $name . '.<br>' . '(Once the user submits the ' . $name . ', he will never see it again)')));
 }
 public function save_meta($poll_id, $meta)
 {
     require_once dirname(__FILE__) . '/Poll.php';
     update_post_meta($poll_id, self::META_KEY_DATA, FCA_FBC_Poll::prepare($meta));
 }