Skip to content

Commit

Permalink
Php Form Builder 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
migliori committed Apr 17, 2018
1 parent 4bece9d commit 500595f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PHP Form Builder.sublime-completions
Expand Up @@ -14,7 +14,7 @@
{ "trigger": "addHelper($helper_text, $element_name)", "contents": "\\$form->addHelper(${1:\\$helper_text}, ${2:\\$element_name});" },
{ "trigger": "addIcon($input_name, $icon_html, $pos)", "contents": "\\$form->addIcon(${1:\\$input_name}, ${2:\\$icon_html}, ${3:\\$pos});" },
{ "trigger": "groupInputs($input1, $input2, $input3 = '')", "contents": "\\$form->groupInputs('${1:field_1}', '${2:field_2}');" },
{ "trigger": "addFileUpload($type, $name, $value = '', $label = '', $attr = '', $fileUpload_config = '')", "contents": "\\$fileUpload_config = array(\n 'xml' => ${1:'default'},\n 'uploader' => ${2:'defaultFileUpload.php'},\n 'btn-text' => ${3:'Browse ...'},\n 'max-number-of-files' => ${4:3}\n);\n\\$form->addHtml('<span class=\"help-block\">3 files max. Accepted File Types : .pdf, .doc[x], .xls[x], .txt</span>', ${5:\\$name}, 'after');\n\\$form->addFileUpload('file', ${5:\\$name}, ${6:\\$value = ''}, ${7:\\$label = ''}, ${8:\\$attr = ''}, \\$fileUpload_config);\n" },
{ "trigger": "addFileUpload($type, $name, $value = '', $label = '', $attr = '', $fileUpload_config = '', $current_file = '')", "contents": "\\$form->addHelper(${1:'3 files max. Accepted File Types : .pdf, .doc[x], .xls[x], .txt', 'cv'});\n \\$fileUpload_config = array(\n 'upload_dir' => ${2:'../../../../../file-uploads/'},\n 'limit' => ${3:3},\n 'file_max_size' => ${4:2},\n 'extensions' => [${5:'pdf', 'doc', 'docx', 'xls', 'xlsx', 'txt'}],\n 'debug' => ${6:true}\n );\n \\$form->addFileUpload('file', ${7:'field-name'}, '', ${8:'Upload your file'}, '', \\$fileUpload_config);\n" },
{ "trigger": "addTextarea($name, $value = '', $label = '', $attr = '')", "contents": "\\$form->addTextarea(${1:\\$name}, ${2:\\$value = ''}, ${3:\\$label = ''}, ${4:\\$attr = ''});" },
{ "trigger": "addOption($select_name, $value, $txt, $group_name = '', $attr = '')", "contents": "\\$form->addOption(${1:\\$select_name}, ${2:\\$value}, ${3:\\$txt}, ${4:\\$group_name = ''}, ${5:\\$attr = ''});" },
{ "trigger": "addSelect($select_name, $label = '', $attr = '', $displayGroupLabels = true)", "contents": "\\$form->addSelect(${1:\\$select_name}, ${2:\\$label}, ${3:\\$attr = ''}, ${4:\\$displayGroupLabels = true});" },
Expand Down
4 changes: 2 additions & 2 deletions messages.json
Expand Up @@ -7,5 +7,5 @@
"3.0.0": "messages/3.0.0.md",
"3.0.1": "messages/3.0.1.md",
"3.0.2": "messages/3.0.2.md",
"3.2": "messages/3.2.md"
}
"3.0.5": "messages/3.0.5.md"
}
5 changes: 5 additions & 0 deletions messages/3.0.5.md
@@ -0,0 +1,5 @@
# Php Form Builder 3.4

## UPDATE
- update Php Form Builder completions :
- edit addFileUpload function

0 comments on commit 500595f

Please sign in to comment.