{"id":18645712,"url":"https://github.com/fliplet/fliplet-widget-form","last_synced_at":"2025-11-05T04:30:26.872Z","repository":{"id":49838723,"uuid":"70168217","full_name":"Fliplet/fliplet-widget-form","owner":"Fliplet","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-22T08:50:50.000Z","size":202,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-27T11:43:38.702Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Fliplet.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}},"created_at":"2016-10-06T15:42:02.000Z","updated_at":"2021-07-22T08:50:53.000Z","dependencies_parsed_at":"2022-09-05T17:10:55.926Z","dependency_job_id":null,"html_url":"https://github.com/Fliplet/fliplet-widget-form","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/Fliplet%2Ffliplet-widget-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-widget-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-widget-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fliplet%2Ffliplet-widget-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fliplet","download_url":"https://codeload.github.com/Fliplet/fliplet-widget-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449562,"owners_count":19640533,"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-07T06:16:55.312Z","updated_at":"2025-11-05T04:30:26.806Z","avatar_url":"https://github.com/Fliplet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fliplet Form Component\n\n## Instances\n\nYou can access form instances\n\n```js\nvar formInstance = Fliplet.Widget.get('com.fliplet.form').forms(UUID);\n```\n\n## Dev Options\n\n### Map form fields before sent\n\n`fields` is an object containing all the fields to be submitted, excluding `type=\"file\"` fields.  \n\n```js\nformInstance.mapData = function(fields) {\n  // fields @Object\n  return fields;\n}\n```\n\n### Custom submission send\nYou can choose not to use our default submit data and create your own.\nThis MUST return a Promise if you want us to show our default form submission confirmation.\n\n```js\nformInstance.submit = function(data) {\n  // Do whatever to data\n  return Promise.resolve();\n}\n```\n\n### Post-submission hooks\n\nWhether you are using the default submission process or your own, you can have an event listener for when submissions are successful.\n\n```js\nformInstance.onSubmit().then(function(){\n  // Submission was a huge success. Celebrate.\n});\n```\n\n### TinyMCE and customisation\n\nAdd a `\u003ctextarea data-tinymce\u003e\u003c/textarea\u003e` field with the `data-tinymce` attribute to create a textarea that supports full formatting support.\n\nYou can also add new TinyMCE or custom plugins by creating a custom `formInstance.onBeforeTinyMCEInit()` promise. `tinymce` must be added to the page dependency for this to work.\n\n```js\nformInstance.onBeforeTinyMCEInit() = function () {\n  var opts = {\n    plugins: 'mycustomplugin',\n    toolbar: 'mycustomplugin'\n  };\n  return Promise.resolve(opts);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliplet%2Ffliplet-widget-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffliplet%2Ffliplet-widget-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliplet%2Ffliplet-widget-form/lists"}