Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Newbie] What is the best web design language that I can use for creating large forms, take data in those forms, then make a print page setup and give the calculated data in good looking PDF

Featured Replies

I want to create a form with lets say about 200 text fields that will input only numbers.

Upon hitting submit, the data will be sent to the backend, it will be calculated and a good PDF of it will be created like in tabular format and given to the user.

Since the data is lot, I will have to make some sort of backup and database system so that if the person filling the data loses power mid away, it won't all be lost.

Which is the best language and database do you recommend for hundreds of columns? Learning it won't be an issue.

Any server-side language can handle the PDF generation and talking to a database.

Rather than setting a specific number of individual fields, I would create a client-side app that lets you add inputs as and when you need them, sort of like how this works, but tailored to what you need.

You don't really want to have a set amount of database columns either. Some options here are:

  • Save JSON or a serialised array to the database containing all data. This is how custom fields often work in CMS's because you can have an arbitrary amount of fields.
  • Save as a document using a NoSQL database. Something like MongoDB would work well for this because you don't need to have a predefined database schema, it can adapt as your data changes.
  • Author
27 minutes ago, Jack said:

Any server-side language can handle the PDF generation and talking to a database.

Rather than setting a specific number of individual fields, I would create a client-side app that lets you add inputs as and when you need them, sort of like how this works, but tailored to what you need.

You don't really want to have a set amount of database columns either. Some options here are:

  • Save JSON or a serialised array to the database containing all data. This is how custom fields often work in CMS's because you can have an arbitrary amount of fields.
  • Save as a document using a NoSQL database. Something like MongoDB would work well for this because you don't need to have a predefined database schema, it can adapt as your data changes.

 

Wow, thank you for this detailed information, Jack. It really helps a lot.

I think I will go with MongoDB as I have worked with it before and I want to use a database.

PDF generation part can be done later, I can use anything in the backend.

 

But what I am stuck at currently is that what I should use for front end....

PHP?

I am confused.... What are my options?

 

Sorry if I sound like a newbie.

19 hours ago, lolcocks said:

 

Wow, thank you for this detailed information, Jack. It really helps a lot.

I think I will go with MongoDB as I have worked with it before and I want to use a database.

PDF generation part can be done later, I can use anything in the backend.

 

But what I am stuck at currently is that what I should use for front end....

PHP?

I am confused.... What are my options?

 

Sorry if I sound like a newbie.

PHP is a backend language, you could do the PDF generation and talking to the database with a language like that, but you wouldn't be able to do the dynamic client example I posted above without using JavaScript.

If you're looking at using MongoDB then I would probably use JavaScript for both the frontend and backend. On the backend side you would use something like NodeJS to generate the PDF and talk to Mongo. Rob posted a package above for Node that can handle PDF generation, and for Mongo there are plenty of packages available like https://mongoosejs.com to interface with the DB. If you don't need authentication and login, this should be fairly straight forward with a bit of JS knowledge and some time spent learning the tools you need. There are plenty tutorials around on using Node and Mongo together.

If going with Mongo I'd also go with a service that provides that database such as mLab rather than attempting to roll your own.  It's just not worth the effort.  We use DynamoDB at work for our NoSQL database which works a little differently to Mongo but a good choice if you are using AWS for your hosting.

There is also Firebase which I use for my personal projects, that's also NoSQL database as a service and is very easy to interface with the client side - I don't have a backend at all with this setup which means I can host it for free on Netlify and only have to pay for the domain name and DNS.

Edited by rbrtsmith

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.