Code Monkey home page Code Monkey logo

formio-export's People

Contributors

airarrazaval avatar matteusbrevik avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

formio-export's Issues

Select component Customization to add values (Data Source Values) in runtime of submitting form

I have a requirement on select components as
We have select component with options/Data Source Values (Ex: opt1, opt2, opt3)
Now I'm going to submit the form in formio tag, But unfortunately opt4 is not in the select component list values/Data Source Values.
So I have to provide Add button (+) at select component like below to add options that missed at the time of submission
even if the values getting from the RestApi/URl for those also i have to add missed Data Source Values

image

Future plans

Project looks to be abandoned. Any plan to improve it or other ideas in this area?
For example, html element is missing and this library is not supporting JSONLogic conditions yet.

How to render html element when exporting to pdf

{
"components": [
{
"label": "HTML",
"className": "",
"attrs": [],
"content": "Please fill all the details below.",
"refreshOnChange": false,
"mask": false,
"tableView": true,
"alwaysEnabled": false,
"type": "htmlelement",
"input": false,
"key": "html"
},
{
"label": "Email",
"tableView": true,
"alwaysEnabled": false,
"type": "email",
"input": true,
"key": "email2"
},
{
"label": "Phone Number",
"allowMultipleMasks": false,
"showWordCount": false,
"showCharCount": false,
"tableView": true,
"alwaysEnabled": false,
"type": "phoneNumber",
"input": true,
"key": "phoneNumber2"
},
{
"type": "button",
"label": "Submit",
"key": "submit",
"disableOnInvalid": true,
"theme": "primary",
"input": true,
"tableView": true
}
]
}

above is the component structure, I tried but couldn't find out, can you guys please help me to render the html data, 1st object in the above array. Thanks.
form io angular demo 1

issues getting started

Hi, I added the <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/formio-export.min.js"></script> under the script that loads formio.full.min.js and when i try to run the code below, i get the error

Uncaught ReferenceError: FormioExport is not defined
at HTMLButtonElement. (:47:21)
at HTMLButtonElement.dispatch (index.js:3)
at HTMLButtonElement.elemData.handle (index.js:3)

let exporter = new FormioExport(component, submission, options);

exporter.toHtml().then((html) => {
  document.body.appendChild(html);
});

let config = {
  download: false,
  filename: 'example.pdf'
};

exporter.toPdf(config).then((pdf) => {
  // download the pdf file
  pdf.save();
  // get the datauri string
  let datauri = pdf.output('datauristring');
})

I have both a Fiddle as well as a gist that reproduces this issue. Any help would be greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.