class Text extends Field
{
public function render($settings) {
- return '<input type="text" name="'. $this->get_name() .'" placeholder="'. $settings['placeholder'] .'" '. $settings['validation'] .'>';
+ $name = $this->name;
+ $type = "text";
+ $attr = "";
+ if(strstr($name,'link')) {
+ $attr = "data-parsley-type='url'";
+ $type = "url";
+ }
+ return '<input type="'.$type.'" name="'. $this->get_name() .'" placeholder="'. $settings['placeholder'] .'" '. $settings['validation'] . ' '.$attr.'>';
}
}
textarea
@apply bg-white
-input[type="text"], input[type="email"], input[type="number"], input[type="password"], select
+input[type="text"], input[type="email"], input[type="number"], input[type="password"],
+input[type="url"], select
appearance: none
border: none
border-radius: 0