mirror of
https://github.com/e107inc/e107.git
synced 2025-07-15 12:06:19 +02:00
Added support for html5 'wrap' attribute on textarea form elements. Example added to FAQs 'ask a question'.
This commit is contained in:
@ -2340,6 +2340,9 @@ class e_form
|
|||||||
if($optval) $ret .= " placeholder='{$optval}'";
|
if($optval) $ret .= " placeholder='{$optval}'";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'wrap':
|
||||||
|
if($optval) $ret .= " wrap='{$optval}'";
|
||||||
|
break;
|
||||||
|
|
||||||
case 'autocomplete':
|
case 'autocomplete':
|
||||||
if($optval) $ret .= " autocomplete='{$optval}'";
|
if($optval) $ret .= " autocomplete='{$optval}'";
|
||||||
@ -2460,6 +2463,8 @@ class e_form
|
|||||||
'pattern' => '',
|
'pattern' => '',
|
||||||
'other' => '',
|
'other' => '',
|
||||||
'autocomplete' => '',
|
'autocomplete' => '',
|
||||||
|
'maxlength' => '',
|
||||||
|
'wrap' => '',
|
||||||
'maxlength' => ''
|
'maxlength' => ''
|
||||||
// 'multiple' => false, - see case 'select'
|
// 'multiple' => false, - see case 'select'
|
||||||
);
|
);
|
||||||
|
@ -285,7 +285,7 @@ class faqs_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
$text .= $frm->open('faq-ask-question','post');
|
$text .= $frm->open('faq-ask-question','post');
|
||||||
|
|
||||||
$text .= "<div>".$frm->text('ask_a_question','',255,array('size'=>'xxlarge','placeholder'=>'Type your question here..')).'<br />'.$frm->submit('submit_a_question','Submit')."</div>";
|
$text .= "<div>".$frm->textarea('ask_a_question','',3, 80 ,array('maxlength'=>255, 'size'=>'xxlarge','placeholder'=>'Type your question here..', 'wrap'=>'soft')).'<br />'.$frm->submit('submit_a_question','Submit')."</div>";
|
||||||
|
|
||||||
$text .= $frm->close();
|
$text .= $frm->close();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user