question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with submitting meta fields

See original GitHub issue

I use uppy dashboard for uploading images. I’m trying to require people to enter some metadata for each image before submitting to the server. However if i edit a file and try to save the metadata, nothing happens.

I need a few different type of HTML elements that’s why i’m using render function as documented on the uppy website.

An example of some of my metaFields:

metaFields: [
                {
                    id: 'name',
                    name: '{{ ('uppy.fields.name') | trans | raw }}',
                    render ({ value, onChange, required, fieldCSSClasses, form }, h) {
                        return h('input', {
                            id: 'uppy-Dashboard-FileCard-input-name',
                            "data-form": form,
                            type: 'text',
                            class: fieldCSSClasses.text + ' form-control',
                            onChange: (ev) => onChange(ev.target.value),
                            value: value,
                            placeholder: '{{ ('uppy.placeholder.name') | trans | raw }}',
                            required,
                        });
                    },
                },
                {
                    id: 'active',
                    name: '{{ ('uppy.fields.active') | trans | raw }}',
                    render: ({value, onChange, form}, h) => {
                        let select_options = [
                            h('option', {value: ''}, '{{ ('general.yes') | trans | raw }}'),
                            h('option', {value: 'no'}, '{{ ('general.no') | trans | raw }}')
                        ]
                        return h('select', {
                            id: 'uppy-Dashboard-FileCard-select-active',
                            "data-form": form,
                            class: 'uppy-c-textInput uppy-Dashboard-FileCard-input form-control',
                            onChange: (ev) => onChange(ev.target.value),
                            value: value
                        }, select_options)
                    },
                },
            ]

I’ve been stuck on this for a few hours now. And what i’ve noticed is that on the dashboard example on uppy website the input fields contain a form attribute, and by looking at the uppy code i’ve noticed that you can get the form id as a parameter. So i’ve been trying to add this to my input fields, but this hasn’t worked for me yet…

I’m using symfony/twig so some options contain twig variables with translate strings.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Murderloncommented, Aug 17, 2021

Pardon me for assuming this is a question and not a bug. This is now confirmed and also discussed in #3111. I’m closing this as a duplicate. Thanks for reporting.

0reactions
arturicommented, Aug 20, 2021

This should have been fixed in the recent patch release, 1.31.1, please upgrade @uppy/core and @uppy/dashboard and let us know if it worked for you. Thanks for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Solve Meta field Truncation Issue - Episerver Support
Any old meta field with metadata type LongString (created before Commerce 13.22) still has Length = 16 in the MetaField table. Whenever a...
Read more >
Custom Meta Fields | WordPress.org
That custom form, upon submit sends a couple of emails, builds the form fields into an array and then uses update_post_meta to upload...
Read more >
Field level submission errors are not propagated to meta ...
What is the expected behavior? The field meta should have submissionError set to 'This value wont do'. Sandbox Link. https://codesandbox.io/s/ ...
Read more >
Moz Pro Site Crawl Managing Metadata Issues - Help Hub
The issues flagged under Metadata Issues concern meta information, such as page titles and descriptions. Metadata Issues impact how search engines process ...
Read more >
Advanced Custom Fields frontend form submission
The update field is called whenever the user clicks on the submit button. The only issue is that the changes do not seem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found