1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Added support for html5 'wrap' attribute on textarea form elements. Example added to FAQs 'ask a question'.

This commit is contained in:
Cameron 2015-06-15 22:20:30 -07:00
parent e5c768a532
commit c98f6a2fdf
2 changed files with 8 additions and 3 deletions

View File

@ -2339,7 +2339,10 @@ class e_form
case 'placeholder':
if($optval) $ret .= " placeholder='{$optval}'";
break;
case 'wrap':
if($optval) $ret .= " wrap='{$optval}'";
break;
case 'autocomplete':
if($optval) $ret .= " autocomplete='{$optval}'";
@ -2460,7 +2463,9 @@ class e_form
'pattern' => '',
'other' => '',
'autocomplete' => '',
'maxlength' => ''
'maxlength' => '',
'wrap' => '',
'maxlength' => ''
// 'multiple' => false, - see case 'select'
);

View File

@ -285,7 +285,7 @@ class faqs_shortcodes extends e_shortcode
$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();