Skip to content

Commit

Permalink
rows added option for textarea field
Browse files Browse the repository at this point in the history
  • Loading branch information
itxchandan committed Nov 27, 2018
1 parent efc9ea2 commit 1d3a269
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions forms/fielditem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
<option value="3">3</option>
<option value="2">2</option>
</field>
<field
showon="type:textarea"
name="textarearows"
type="number"
default="5"
label="MOD_JDSCF_TEXTAREA_ROWS_LBL"
description="MOD_JDSCF_TEXTAREA_ROWS_DESC"
/>
<field
showon="type:text[OR]type:number"
name="min_length"
Expand Down
3 changes: 3 additions & 0 deletions language/en-GB/en-GB.mod_jdsimplecontactform.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ MOD_JDSCF_SUBMITBTN_CLASS_DESC=""

MOD_JDSCF_DEFAULT_SUBJECT="New Submission%s"

MOD_JDSCF_TEXTAREA_ROWS_LBL="Rows"
MOD_JDSCF_TEXTAREA_ROWS_DESC=""

MOD_JDSCF_THANKYOU_DEFAULT="Thank you."
MOD_JDSCF_BAD_REQUEST="Bad Request"
MOD_JDSCFEMAIL_SEND_ERROR="An error occurred while sending email."
Expand Down
2 changes: 1 addition & 1 deletion layouts/fields/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
$attrs[] = 'data-parsley-required-message="' . JText::sprintf('MOD_JDSCF_REQUIRED_ERROR', strip_tags($label)) . '"';
}
?>
<textarea class="form-control" name="jdscf[<?php echo $field->name; ?>]" <?php echo implode(' ', $attrs); ?>></textarea>
<textarea class="form-control" rows="<?php echo $field->textarearows; ?>" name="jdscf[<?php echo $field->name; ?>]" <?php echo implode(' ', $attrs); ?>></textarea>

0 comments on commit 1d3a269

Please sign in to comment.