Is there a limit on number of fields in a Netlify form?

Hi!

Is there a limit of how many fields a Netlify Form can have. I have about 120 fields (… I know right…) and the build/deployment fails (just on Netlify) without an error. If I remove some most of the fields, it builds successfully. If I remove less of the fields it fails. Running these builds over and and over again to narrow it down is taking a long time and is killing my allotted minus.

Thanks!

hey there, can you link us or paste the deploy log of one of these builds that fails, please?

Hi! Sure thing! I dont know how to send a link… but maybe you have admin access to see this: https://app.netlify.com/sites/leapsinc/deploys/5f1e1c5e9579480007d1a758

Otherwise, below is the log (I hit the message limit so Ive replace some repeated text with “MORE DATA HERE”:
8:14:22 PM: Build ready to start
8:14:24 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
8:14:24 PM: build-image tag: v3.3.20
8:14:24 PM: buildbot version: be8ecf2af866e16fa4301cc5c14de2ccbbb21cf4
8:14:24 PM: Fetching cached dependencies
8:14:24 PM: Starting to download cache of 210.1MB
8:14:30 PM: Finished downloading cache in 5.78621014s
8:14:30 PM: Starting to extract cache
8:14:40 PM: Finished extracting cache in 9.464918428s
8:14:40 PM: Finished fetching cache in 15.310378051s
8:14:40 PM: Starting to prepare the repo for build
8:14:40 PM: Preparing Git Reference refs/heads/master
8:14:42 PM: Starting build script
8:14:42 PM: Installing dependencies
8:14:42 PM: Python version set to 2.7
8:14:42 PM: Started restoring cached node version
8:14:45 PM: Finished restoring cached node version
8:14:45 PM: v12.18.0 is already installed.
8:14:46 PM: Now using node v12.18.0 (npm v6.14.4)
8:14:46 PM: Started restoring cached build plugins
8:14:46 PM: Finished restoring cached build plugins
8:14:46 PM: Attempting ruby version 2.7.1, read from environment
8:14:47 PM: Using ruby version 2.7.1
8:14:48 PM: Using PHP version 5.6
8:14:48 PM: 5.2 is already installed.
8:14:48 PM: Using Swift version 5.2
8:14:48 PM: Started restoring cached node modules
8:14:48 PM: Finished restoring cached node modules
8:14:48 PM: Started restoring cached yarn cache
8:14:48 PM: Finished restoring cached yarn cache
8:14:48 PM: Installing NPM modules using Yarn version 1.22.4
8:14:49 PM: yarn install v1.22.4
8:14:49 PM: [1/4] Resolving packages…
8:14:50 PM: [2/4] Fetching packages…
8:15:02 PM: warning url-loader@1.1.2: Invalid bin field for “url-loader”.
8:15:22 PM: info fsevents@1.2.13: The platform “linux” is incompatible with this module.
8:15:22 PM: info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation.
8:15:22 PM: info fsevents@2.1.3: The platform “linux” is incompatible with this module.
8:15:22 PM: info “fsevents@2.1.3” is an optional dependency and failed compatibility check. Excluding it from installation.
8:15:22 PM: [3/4] Linking dependencies…
8:15:22 PM: warning " > eslint-config-airbnb@18.1.0" has incorrect peer dependency “eslint-plugin-react-hooks@^2.5.0 || ^1.7.0”.
MORE Warnings DATA HERE
8:15:22 PM: warning “workspace-aggregator-20fda9bc-bc4c-48cf-b157-b3b371132a1e > gatsby-theme-seagull > babel-preset-gatsby > @babel/preset-react > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.10.1” has unmet peer dependency “@babel/core@^7.0.0-0”.
8:15:43 PM: [4/4] Building fresh packages…
8:15:49 PM: Done in 60.88s.
8:15:50 PM: NPM modules installed using Yarn
8:15:50 PM: Started restoring cached go cache
8:15:50 PM: Finished restoring cached go cache
8:15:50 PM: go version go1.14.4 linux/amd64
8:15:50 PM: go version go1.14.4 linux/amd64
8:15:50 PM: Installing missing commands
8:15:50 PM: Verify run directory
8:15:51 PM: ​
8:15:51 PM: ┌─────────────────────────────┐
8:15:51 PM: │ Netlify Build │
8:15:51 PM: └─────────────────────────────┘
8:15:51 PM: ​
8:15:51 PM: ❯ Version
8:15:51 PM: @netlify/build 3.0.1
8:15:51 PM: ​
8:15:51 PM: ❯ Flags
8:15:51 PM: deployId: 5f1e1c5e9579480007d1a758
8:15:51 PM: mode: buildbot
8:15:51 PM: ​
8:15:51 PM: ❯ Current directory
8:15:51 PM: /opt/build/repo
8:15:51 PM: ​
8:15:51 PM: ❯ Config file
8:15:51 PM: /opt/build/repo/netlify.toml
8:15:51 PM: ​
8:15:51 PM: ❯ Context
8:15:51 PM: production
8:15:51 PM: ​
8:15:51 PM: ❯ Loading plugins
8:15:51 PM: - netlify-plugin-gatsby-cache@0.3.0 from netlify.toml
8:15:51 PM: ​
8:15:51 PM: ┌────────────────────────────────────────────────────────┐
8:15:51 PM: │ 1. onPreBuild command from netlify-plugin-gatsby-cache │
8:15:51 PM: └────────────────────────────────────────────────────────┘
8:15:51 PM: ​
8:15:52 PM: Found a Gatsby cache. We’re about to go FAST. :zap:
8:15:52 PM: ​
8:15:52 PM: (netlify-plugin-gatsby-cache onPreBuild completed in 601ms)
8:15:52 PM: ​
8:15:52 PM: ┌───────────────────────────────────┐
8:15:52 PM: │ 2. Build command from Netlify app │
8:15:52 PM: └───────────────────────────────────┘
8:15:52 PM: ​
8:15:52 PM: yarn workspace site build 8:15:52 PM: yarn workspace v1.22.4 8:15:52 PM: yarn run v1.22.4 8:15:52 PM: GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages
8:15:55 PM: success open and validate gatsby-configs - 0.267s
8:15:56 PM: pageCreationFunctions: { createHomepage: [AsyncFunction], createPages: [AsyncFunction] }
8:15:56 PM: success load plugins - 0.797s
8:15:56 PM: success onPreInit - 0.013s
8:15:56 PM: success initialize cache - 0.015s
8:15:56 PM: success copy gatsby files - 0.044s
8:15:56 PM: info [sanity] Fetching remote GraphQL schema
8:15:57 PM: info [sanity] Transforming to Gatsby-compatible GraphQL SDL
8:15:57 PM: warning [sanity] Type SanityAssetSourceData has field with name id, which conflicts with Gatsby’s internal properties. Renaming to sanityIdinfo [sanity] Stitching GraphQL schemas from SDL
8:15:57 PM: success onPreBootstrap - 0.611s
8:15:57 PM: success createSchemaCustomization - 0.002s
8:15:57 PM: info [sanity] Fetching export stream for dataset
8:15:58 PM: info [sanity] Done exporting!
8:15:58 PM: success source and transform nodes - 0.852s
8:15:58 PM: success building schema - 0.644s
8:15:58 PM: info :fire: Homepage module is active
8:15:58 PM: success :pizza: Page created: http://localhost:8000/
MORE DATA HERE
8:15:59 PM: success :pizza: tag list page created: http://localhost:8000/blog/tag/positivity/
8:15:59 PM: success createPages - 0.186s
8:15:59 PM: success createPagesStatefully - 0.051s
8:15:59 PM: success onPreExtractQueries - 0.003s
8:15:59 PM: success update schema - 0.088s
8:16:00 PM: success extract queries from components - 1.042s
8:16:00 PM: warning The GraphQL query in the non-page component “/opt/build/repo/gatsby-theme-seagull/src/templates/location-data.js” will not be run.
8:16:00 PM: warning The GraphQL query in the non-page component “/opt/build/repo/gatsby-theme-seagull/src/templates/locationPage-data.js” will not be run.
8:16:00 PM: Exported queries are only executed for Page components. It’s possible you’re
8:16:00 PM: trying to create pages in your gatsby-node.js and that’s failing for somereason.
8:16:00 PM: If the failing component(s) is a regular component and not intended to be a page
8:16:00 PM: component, you generally want to use a (https://gatsbyjs.org/docs/static-query)
8:16:00 PM: instead of exporting a page query.
8:16:00 PM: If you’re more experienced with GraphQL, you can also export GraphQLfragments from components and compose the fragments in the Page component
8:16:00 PM: query and pass data down into the child component — https://graphql.org/learn/queries/#fragments
8:16:00 PM: success write out requires - 0.006s
8:16:00 PM: success write out redirect data - 0.194s
8:16:01 PM: success Build manifest and related icons - 0.993s
8:16:01 PM: success onPostBootstrap - 0.996s
8:16:01 PM: ⠀
8:16:01 PM: info bootstrap finished - 8.638s
8:16:01 PM: ⠀
8:16:37 PM: success Building production JavaScript and CSS bundles - 35.576s
8:16:37 PM: success Rewriting compilation hashes - 0.001s
8:16:37 PM: success run page queries - 0.011s - 1/1 94.95/s
8:16:44 PM: success Building static HTML for pages - 6.861s - 58/58 8.45/s
8:16:44 PM: success Delete previous page data - 0.000s
8:17:13 PM: :heavy_check_mark: prettified public/blog/everything-is-connected/index.html
8:17:13 PM: :heavy_check_mark: prettified public/blog/i-rarely-admit-it-but-i-am-really-awesome/index.html
8:17:13 PM: :heavy_check_mark: prettified public/blog/john-e-n-daniels-keen-insights-on-effective-adolescent-leadership-coaching/index.html
8:17:13 PM: :heavy_check_mark: prettified public/blog/an-examination-of-conflict-and-crisis-management-from-an-administrative-view/index.html
MORE DATA HERE
8:18:02 PM: :heavy_check_mark: prettified public/resources/index.html
8:18:02 PM: :sparkles: finished prettifying 58 Gatsby build files
8:18:02 PM: info Generated public/sw.js, which will precache 8 files, totaling 393869 bytes.
8:18:02 PM: The following pages will be precached:
8:18:02 PM: /offline-plugin-app-shell-fallback/index.html
8:18:02 PM: success onPostBuild - 78.368s
8:18:02 PM: info Done building in 129.79338206 sec
8:18:02 PM: info Built pages:
8:18:02 PM: Updated page: /offline-plugin-app-shell-fallback/
MORE DATA HERE
8:18:02 PM: Updated page: /blog/tag/positivity
8:18:02 PM: Done in 130.02s.
8:18:02 PM: Done in 130.37s.
8:18:02 PM: ​
8:18:02 PM: (build.command completed in 2m 10.6s)
8:18:02 PM: ​
8:18:02 PM: ┌─────────────────────────────────────────────────────────┐
8:18:02 PM: │ 3. onPostBuild command from netlify-plugin-gatsby-cache │
8:18:02 PM: └─────────────────────────────────────────────────────────┘
8:18:02 PM: ​
8:18:03 PM: Stored the Gatsby cache to speed up future builds.
8:18:03 PM: ​
8:18:03 PM: (netlify-plugin-gatsby-cache onPostBuild completed in 435ms)
8:18:03 PM: ​
8:18:03 PM: ┌─────────────────────────────┐
8:18:03 PM: │ Netlify Build Complete │
8:18:03 PM: └─────────────────────────────┘
8:18:03 PM: ​
8:18:03 PM: (Netlify Build completed in 2m 11.9s)
8:18:03 PM: Caching artifacts
8:18:03 PM: Started saving node modules
8:18:03 PM: Finished saving node modules
8:18:03 PM: Started saving build plugins
8:18:03 PM: Finished saving build plugins
8:18:03 PM: Started saving yarn cache
8:18:03 PM: Finished saving yarn cache
8:18:03 PM: Started saving pip cache
8:18:03 PM: Finished saving pip cache
8:18:03 PM: Started saving emacs cask dependencies
8:18:03 PM: Finished saving emacs cask dependencies
8:18:03 PM: Started saving maven dependencies
8:18:03 PM: Finished saving maven dependencies
8:18:03 PM: Started saving boot dependencies
8:18:03 PM: Finished saving boot dependencies
8:18:03 PM: Started saving go dependencies
8:18:03 PM: Finished saving go dependencies
8:18:03 PM: Build script success
8:18:03 PM: Starting to deploy site from ‘site/public’
8:18:03 PM: Creating deploy tree
8:18:03 PM: Creating deploy upload records
8:18:03 PM: 65 new files to upload
8:18:03 PM: 0 new functions to upload
8:18:05 PM: Starting post processing
8:18:05 PM: Post processing - HTML
8:18:11 PM: Starting post processing
8:18:11 PM: Post processing - HTML
8:18:12 PM: Starting post processing
8:18:12 PM: Post processing - HTML
8:18:13 PM: Starting post processing
8:18:13 PM: Post processing - HTML
8:18:14 PM: Starting post processing
8:18:14 PM: Post processing - HTML
8:18:39 PM: Finished processing build request in 4m15.289528373s

Thanks! That link was EXACTLY what we were looking for; Our Support team can see that page on your site.

From it I sleuthed around a bit in our internal logs and it appears there is some kind of formatting error in /client-intake-form/index.html . This is the error we see:

</form>: unexpected 's-name48' after '[:equal, "'spouse'"]'

Perhaps you can hunt around there and see the problem?

OH Interesting… That does help! Is there anyway I can see formatting errors like that?

Thanks! @fool

Not at present, but you can tell “something” went wrong when you see this pattern in your logs:

5:18:05 PM: Starting post processing
5:18:05 PM: Post processing - HTML
5:18:11 PM: Starting post processing
5:18:11 PM: Post processing - HTML
5:18:12 PM: Starting post processing
5:18:12 PM: Post processing - HTML
5:18:13 PM: Starting post processing
5:18:13 PM: Post processing - HTML
5:18:14 PM: Starting post processing
5:18:14 PM: Post processing - HTML

…that something like this went wrong. We should only say Starting post processing once; we have 5 retries and then give up. IT is occasionally the case that something transient went wrong - we were deploying some component of our service while your assets were processing - and a second or third try will work - but if you see 5, we generally couldn’t succeed based on something in your code.

This is the first time I’ve seen an actual syntax error like this; it’s usually a reference in CSS to missing files or something like that, so congrats on finding a new error vector :smiley:

You’re Welcome :sweat_smile:

Just in case it helps anyone else, turns out, I had a form input that ended up with some non-valid HTML. One of my inputs had a ' in the name field, and I bet the Netlify Form parser saw it and said NOOOOO (insert gif of Michael Scott here). This is the guilty suspect:

<input name="reason-for-doctor's-care" type="text">

A simple replace fixed it. Maybe in time Netlify could strip out breaking characters on their end too, or maybe some error reporting?

Thanks for the help on this one!

1 Like

That would be a smart thing to do but also a challenge - our form handling service is looking for the name that your code sends, and just encoding it on our side wouldn’t affect how you send it. So this really is a fatal error - we can’t read the name of the field OR turn it into something that would “just work” for you based on the code you wrote.

But better error handling is definitely a thing we should (and are now) tracking as a feature request. We could at least tell you where the problem is since we do find out :slight_smile: