" name="fieldInputName); ?>[name]" id="fieldInputName); ?>[name]" required/>

" name="fieldInputName); ?>[desc]" id="fieldInputName); ?>[desc]"/>

" type="text" name="fieldInputName); ?>[icon]" id="fieldInputName); ?>[icon]"/>

fieldData["required"], 1, true); ?> name="fieldInputName); ?>[required]" id="fieldInputName); ?>[required]"/>
fieldData["is_show_sform"], 1, true); ?> name="fieldInputName); ?>[is_show_sform]" id="fieldInputName); ?>[is_show_sform]"/>
fieldData["is_show_on_comment"], 1, true); ?> name="fieldInputName); ?>[is_show_on_comment]" id="fieldInputName); ?>[is_show_on_comment]"/>
fieldData["show_for_guests"], 1, true); ?> name="fieldInputName); ?>[show_for_guests]" id="fieldInputName); ?>[show_for_guests]"/>
fieldData["show_for_users"], 1, true); ?> name="fieldInputName); ?>[show_for_users]" id="fieldInputName); ?>[show_for_users]"/>
isShowForUser($data) || ($comment->comment_parent && !$data["is_show_sform"])) { return ""; } $html = ""; $html .= ""; $html .= ""; $html .= "
"; $required = $this->isValidateRequired($data) ? "required='required' aria-required='true'" : ""; $html .= ""; $html .= "
"; $html .= ""; return $html; } public function frontFormHtml($name, $args, $options, $currentUser, $uniqueId, $isMainForm) { if (!$this->isShowForUser($args, $currentUser) || (!$isMainForm && !$args["is_show_sform"])) { return; } $hasIcon = $args["icon"] ? true : false; $hasDesc = $args["desc"] ? true : false; ?>
">
">
" class=" wpd-field wpd-field-date" type="date" name="" value="" placeholder="03/28/2016" pattern="^(1[0-2]|0[1-9])/(3[01]|[12][0-9]|0[1-9])/[0-9]{4}$" title="03/28/2016">
isShowForUser($args)) { return ""; } $html = "
"; $html .= "
" . esc_html($args["name"]) . "
" . esc_html(apply_filters("wpdiscuz_custom_field_date", $value, $args)) . "
"; $html .= "
"; return $html; } public function validateFieldData($fieldName, $args, $options, $currentUser) { $value = Sanitizer::sanitize(INPUT_POST, $fieldName, "FILTER_SANITIZE_STRING"); if ($value && !preg_match("@^[0-9]{4}-[0-9]{2}-[0-9]{2}$@is", $value)) { $value = ""; } if ($this->isValidateRequired($args, $currentUser) && !$value && $args["required"]) { wp_die(esc_html__($args["name"], "wpdiscuz") . " : " . esc_html__("field is required!", "wpdiscuz")); } return $value; } protected function initDefaultData() { $this->fieldDefaultData = [ "name" => "", "desc" => "", "icon" => "fa-calendar-alt", "required" => "0", "loc" => "bottom", "is_show_on_comment" => 1, "is_show_sform" => 1, "show_for_guests" => 1, "show_for_users" => 1, ]; } }