{"id":20208115,"url":"https://github.com/cubiclesoft/php-flexforms-modules","last_synced_at":"2025-07-24T15:07:19.495Z","repository":{"id":17934335,"uuid":"20908884","full_name":"cubiclesoft/php-flexforms-modules","owner":"cubiclesoft","description":"Official PHP modules for FlexForms (charts, HTML editor, etc).  MIT or LGPL.","archived":false,"fork":false,"pushed_at":"2024-07-29T23:00:01.000Z","size":1152,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T11:38:47.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cubiclesoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-17T03:23:34.000Z","updated_at":"2024-07-29T23:00:05.000Z","dependencies_parsed_at":"2024-11-14T05:34:16.845Z","dependency_job_id":"ed0c26e1-e548-4441-a7b0-5c2a35c6ebf3","html_url":"https://github.com/cubiclesoft/php-flexforms-modules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fphp-flexforms-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fphp-flexforms-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fphp-flexforms-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cubiclesoft%2Fphp-flexforms-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cubiclesoft","download_url":"https://codeload.github.com/cubiclesoft/php-flexforms-modules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248221663,"owners_count":21067596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T05:34:12.107Z","updated_at":"2025-04-10T12:54:54.091Z","avatar_url":"https://github.com/cubiclesoft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"FlexForms Modules for PHP\n=========================\n\nOfficial PHP modules for [FlexForms](https://github.com/cubiclesoft/php-flexforms).  Choose from a MIT or LGPL license.\n\nFormerly called Admin Pack Modules.  The modules in this repository extend [FlexForms](https://github.com/cubiclesoft/php-flexforms) and also [Admin Pack](https://github.com/cubiclesoft/admin-pack).\n\n[![Donate](https://cubiclesoft.com/res/donate-shield.png)](https://cubiclesoft.com/donate/) [![Discord](https://img.shields.io/discord/777282089980526602?label=chat\u0026logo=discord)](https://cubiclesoft.com/product-support/github/)\n\nFeatures\n--------\n\n* Officially supported modules for FlexForms.\n* Modules have a liberal open source license.  MIT or LGPL, your choice.\n* Designed for relatively painless integration into your project.\n* Sits on GitHub for all of that pull request and issue tracker goodness to easily submit changes and ideas respectively.\n\nAvailable Modules\n-----------------\n\n* Calendar - Adds a new field type (calendar) that replaces the input array with a set of standard FlexForms tables to display a calendar.\n* Chart - Adds a new field type (chart) that displays a variety of [C3.js charts](http://c3js.org/).\n* File Uploader - Adds new options to the 'file' field type to display a fancy file uploader that supports drag-and-drop, previews, client-side file naming, chunked uploads, and more.\n* HTML Editor - Adds new options to the 'textarea' field type to convert a textarea into a TinyMCE HTML editor.  Filtering content submitted to the server for cross-site scripting (XSS) injection attempts is up to the developer, but using [TagFilter](https://github.com/cubiclesoft/ultimate-web-scraper) is highly recommended.\n* Preview URL - Adds new options to all field types to show a preview dialog on click for supported MIME types.  Can preview images, audio, video, and 'iframe' content.  Applied to elements that have a 'data-preview-type' attribute which specifies the MIME type.\n* Stop Password Manager - Adds a new option to the 'password' field type that can be used to stop password managers from attempting to store entered passwords.\n* reCAPTCHA - Adds a new field type (recaptcha) that displays and can validate [Google reCAPTCHA](https://www.google.com/recaptcha/intro/).\n* Table Filter - Adds new options to the 'table' field type to display a search field at the top of the table to quickly find matching rows more efficiently than built-in browser searching.\n* Text Counter - Adds new options to the 'text' and 'textarea' field types to display a counter that shows the number of characters (or words) entered.\n\nUsage\n-----\n\nCopy all the files for a specific module into the same directory that FlexForms resides in (e.g. `support/flex_forms.php`).  Then use `require_once` directives to include the required functionality after including FlexForms.  Modules register themselves automatically with the FlexForms class.\n\nThe following new field types are added:\n\n* calendar (via Calendar) - Replaces the input with one or more standard FlexForms tables to display a calendar.\n* chart (via Chart) - Displays [C3.js charts](http://c3js.org/).\n* recaptcha (via reCAPTCHA) - Displays a [Google reCAPTCHA](https://www.google.com/recaptcha/intro/).\n\nNew type-specific options for array fields:\n\n* startyear (calendar) - An integer containing the starting year (inclusive) (Default is date(\"Y\")).\n* startmonth (calendar) - An integer containing the starting month (inclusive) (Default is date(\"m\")).\n* endyear (calendar) - An integer containing the ending year (inclusive) (Default is date(\"Y\")).\n* endmonth (calendar) - An integer containing the ending month (inclusive) (Default is date(\"m\")).\n* cols (calendar) - An array of strings containing the column text to use for each table header (Default is array(\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\")).\n* data (calendar) - An array of key-value pairs that maps date strings in YYYY-MM-DD format to custom HTML for that date (Default is array()).\n* monthcallback (calendar) - A valid callback function for a callback that will have an opportunity to alter the generated table field for a specific month.  The callback function must accept three parameters - callback(\u0026$field, $curryear, $currmonth).\n* daycallback (calendar) - A valid callback function for a callback that can alter the content output for a specific day of the month.  The callback function must return a string (e.g. `return $data;`) and accept four parameters - callback($curryear, $currmonth, $currday, $data).\n* chart (chart) - A string containing one of \"line\", \"spline\", \"step\", \"area\", \"area-spline\", \"area-step\", \"bar\", \"scatter\", \"pie\", \"donut\", or \"gauge\".\n* colors (chart) - An array of strings containing HTML hex color codes.  Mostly used for gauge charts.\n* thresholds (chart) - An array of strings containing percentages that correlate to the \"colors\" option.  Mostly used for gauge charts.\n* x (chart) - An array containing x-axis values for the data points (e.g. dates in YYYY-MM-DD format).\n* data (chart) - An array containing key-value pairs where values are arrays of values.\n* options (chart) - An array of options to pass to [C3.js](http://c3js.org/reference.html) (e.g. array(\"grid.x.show\" =\u003e true, \"zoom.enabled\" =\u003e true)).\n* callbacks (chart) - An array of Javascript callbacks to pass to [C3.js](http://c3js.org/reference.html).\n* uploader (file + File Uploader) - A boolean indicating whether or not to replace the file input with a fancy file uploader.\n* maxchunk (file + File Uploader) - An integer containing the maximum amount of data, in bytes, to upload in chunked upload mode.\n* maxsize (file + File Uploader) - An integer containing the maximum amount of data, in bytes, to upload in normal upload mode.\n* uploader_options (file + File Uploader) - An array of options to pass to [Fancy File Uploader](https://github.com/cubiclesoft/jquery-fancyfileuploader).\n* uploader_callbacks (file + File Uploader) - An array of Javascript callbacks to pass to [Fancy File Uploader](https://github.com/cubiclesoft/jquery-fancyfileuploader).\n* html (textarea + HTML editor) - A boolean indicating whether or not to turn the textarea into a HTML editor.\n* html_options (textarea + HTML editor) - An array of options to pass to [TinyMCE](https://www.tinymce.com/docs/configure/integration-and-setup/).\n* html_callbacks (textarea + HTML editor) - An array of Javascript callbacks to pass to [TinyMCE](https://www.tinymce.com/docs/configure/integration-and-setup/).\n* previewurl (Preview URL) - A boolean that specifies whether or not to use preview URL.\n* previewurl_options (Preview URL) - An array of options to pass to [PreviewURL](https://github.com/cubiclesoft/php-flexforms-modules/tree/master/preview-url/jquery.previewurl.js).\n* previewurl_callbacks (Preview URL) - An array of Javascript callbacks to pass to [PreviewURL](https://github.com/cubiclesoft/php-flexforms-modules/tree/master/preview-url/jquery.previewurl.js).\n* passwordmanager (password + Stop Password Manager) - A boolean indicating whether or not to allow web browser password managers to work.\n* sitekey (recaptcha) - A string containing a [site key](https://www.google.com/recaptcha/admin).\n* size (recaptcha) - A string containing a valid size (depends on the version and sitekey but \"invisible\" for Invisible reCAPTCHA and \"normal\" or \"compact\" for reCAPTCHA v2).\n* options (recaptcha) - An array of extra options to pass to [Invisible reCAPTCHA](https://developers.google.com/recaptcha/docs/invisible#render_param) or [reCAPTCHA v2](https://developers.google.com/recaptcha/docs/display#render_param).  Note that callback options won't work.\n* filter (table + Table Filter) - A boolean indicating whether or not to enable the table filter module on the table.\n* filter_options (table + Table Filter) - An array of options to pass to [FilterTable](https://github.com/sunnywalker/jQuery.FilterTable).\n* filter_callbacks (table + Table Filter) - An array of Javascript callbacks to pass to [FilterTable](https://github.com/sunnywalker/jQuery.FilterTable).\n* counter (text/textarea + Text Counter) - A boolean of true, an integer, or an array of 'min' and 'max' options containing the limit on the number of characters to allow.\n* counter_options (text/textarea + Text Counter) - An array of options to pass to [TextCounter](https://github.com/cubiclesoft/php-flexforms-modules/tree/master/text-counter/jquery.textcounter.js).\n* counter_callbacks (text/textarea + Text Counter) - An array of Javascript callbacks to pass to [TextCounter](https://github.com/cubiclesoft/php-flexforms-modules/tree/master/text-counter/jquery.textcounter.js).\n\nExamples\n--------\n\nExample code showing how to use most modules can be found in the Admin Pack [admin.php file](https://github.com/cubiclesoft/admin-pack/blob/master/admin.php).\n\nreCAPTCHA Module Example\n------------------------\n\nSince it doesn't really belong in Admin Pack, here's a brief example of using the reCAPTCHA module:\n\n```php\n\u003c?php\n\t// This example is derived from:\n\t//   https://github.com/cubiclesoft/php-flexforms/blob/master/docs/flex_forms.md\n\n\trequire_once \"support/str_basics.php\";\n\trequire_once \"support/flex_forms.php\";\n\trequire_once \"support/flex_forms_recaptcha.php\";\n\n\t// ...\n\n\t$errors = array();\n\tif (isset($_REQUEST[$ff-\u003eGetHashedFieldName(\"name\")]))\n\t{\n\t\t// ...\n\n\t\t$result = FlexForms_reCAPTCHA::IsValid(\"[Your secret key goes here]\");\n\t\tif (!$result[\"success\"])  $errors[\"recaptcha\"] = $result[\"error\"] . \" (\" . $result[\"errorcode\"] . \")\";\n\n\t\tif (!count($errors))\n\t\t{\n\t\t\t// ...\n\t\t}\n\t}\n\n\t// ...\n\n\t// Make your own site and secret key:  https://www.google.com/recaptcha/admin\n\n\t$contentopts = array(\n\t\t\"hashnames\" =\u003e true,\n\t\t\"fields\" =\u003e array(\n\t\t\t// ...\n\t\t\tarray(\n\t\t\t\t\"title\" =\u003e \"Module:  Invisible reCAPTCHA\",\n\t\t\t\t\"type\" =\u003e \"recaptcha\",\n\t\t\t\t\"name\" =\u003e \"recaptcha\",\n\t\t\t\t\"sitekey\" =\u003e \"[Your site key here]\",\n\t\t\t\t\"size\" =\u003e \"invisible\",\n\t\t\t\t\"desc\" =\u003e \"Description for reCAPTCHA.\"\n\t\t\t)\n\t\t),\n\t\t\"submit\" =\u003e \"Submit\"\n\t);\n\n\t$ff-\u003eGenerate($contentopts, $errors);\n?\u003e\n```\n\nEven though the 'recaptcha' name attribute is not output, it is used for displaying error messages regarding reCAPTCHA submissions.\n\nFlexForms_reCAPTCHA::IsValid($secretkey, $remoteip = true, $allowedhosts = true)\n--------------------------------------------------------------------------------\n\nModule:  reCAPTCHA\n\nAccess:  public static\n\nParameters:\n\n* $secretkey - A string containing a [secret key](https://www.google.com/recaptcha/admin).\n* $remoteip - A boolean that determines whether or not to pass the remote IP address of the client to reCAPTCHA or a string or IPAddr compatible array containing a specific IP address to pass (Default is true).\n* $allowedhosts - A boolean to allow all hosts or a string or an array to only allow specific hosts to be valid (Default is true).\n\nReturns:  A standard array of information.\n\nThis function sends the reCAPTCHA code in $_REQUEST[\"g-recaptcha-response\"] to the Google reCAPTCHA verification server.  The included HTTP, WebBrowser, and IPAddr classes are loaded as needed.  The defaults are generally good enough but customizations of the sitekey/secretkey (e.g. removing domain restrictions, proxying requests) may require calling this function with corrected options for `$remoteip` and `$allowedhosts` to guarantee that the CAPTCHA was solved by a valid IP address and hostname.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcubiclesoft%2Fphp-flexforms-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcubiclesoft%2Fphp-flexforms-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcubiclesoft%2Fphp-flexforms-modules/lists"}