# Showing the uploadURL in a text field

**URL:** <https://community.transloadit.com/t/showing-the-uploadurl-in-a-text-field/15237>\
**Category:** Uppy\
**Created:** [March 26, 2020, 2:13pm UTC](https://community.transloadit.com/t/showing-the-uploadurl-in-a-text-field/15237 "2020-03-26T14:13:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![growora](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@growora](https://community.transloadit.com/u/growora)\
**Post date:** [March 26, 2020, 2:13pm UTC](https://community.transloadit.com/t/showing-the-uploadurl-in-a-text-field/15237/1 "2020-03-26T14:13:18Z")

</div>

Hi there,

I’m trying to update a hidden text field within a form I’m using Uppy in. I would like when the results are complete, to update a particular field using javascript. I have tried:

```
uppy.on('complete', result => {
  console.log('successful files:', result.successful)
  console.log('failed files:', result.failed)
  document.getElementById("cred_form_3371360_1-textfield-4-1585230845").value="what does here";
})

```

But this always produces:

```
getTimeStamp.js:3 [Uppy] [22:11:47] Cannot set property 'value' of null
error @ getTimeStamp.js:3

```

The code in entirety is as follows:

```
var uppy = Uppy.Core({ debug: true, autoProceed: true, allowMultipleUploads: false, restrictions: { maxFileSize: null, maxNumberOfFiles: 1, minNumberOfFiles: 1, allowedFileTypes: ['video/*', '.mp4', '.mov', '.avi', '.m4v'] } })
 
  uppy.use(Uppy.Webcam, {
  onBeforeSnapshot: () => Promise.resolve(),
  countdown: false,
  modes: [
    'video-audio',
    'audio-only'
  ],
  mirror: true,
  facingMode: 'user',
  showRecordingLength: true,
  locale: {}
  })
  

  
  uppy.use(Uppy.Dashboard, {
  target: '#panel',
  inline: true,
  height: 777,
  showLinkToFileUploadResult: false,
  showProgressDetails: true,
  hideUploadButton: false,
  hideRetryButton: false,
  hidePauseResumeButton: false,
  hideCancelButton: false,
  hideProgressAfterFinish: false,
  closeAfterFinish: false,
  disableStatusBar: false,
  disableInformer: false,
  disableThumbnailGenerator: false,
  proudlyDisplayPoweredByUppy: false,
  showSelectedFiles: false,
  plugins: ['Webcam'],
  browserBackButtonClose: false
})

 
  uppy.use(Uppy.Tus, { endpoint: 'https://master.tus.io/files/' })
  
uppy.on('upload', (data) => {
console.log('Starting upload')
var addFiles = document.querySelector('.uppy-DashboardAddFiles');
var uploadArea = document.querySelector('.uppy-Dashboard');
var videoForm = document.getElementById('video-submission-form');
var uploadPanel = document.getElementById('panel');
addFiles.style.display = 'none';
uploadArea.style.height = '50px';
videoForm.style.display = 'block';
console.log('Reduced uploader size.')
})

uppy.on('complete', result => {
  console.log('successful files:', result.successful)
  console.log('failed files:', result.failed)
  document.getElementById("cred_form_3371360_1-textfield-4-1585230845").value="what does here";
})
```

---

<div class="post-metadata">

**Author:** ![ajkachnic](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/ajkachnic/32/260_2.png) [@ajkachnic](https://community.transloadit.com/u/ajkachnic)\
**Post date:** [July 8, 2020, 12:36am UTC](https://community.transloadit.com/t/showing-the-uploadurl-in-a-text-field/15237/2 "2020-07-08T00:36:46Z")

</div>

This appears to be an issue with getting the element from the document and not Uppy. That error is resulting from the `document.getElementById`. The resulting error means that they element does not exist.

If you go into your developer tools and select the element you’d like to change, you should be able to right click and copy the CSS Path or selector. You could then feed this into

```javascript
const element = document.querySelector('whatever css path');
element.value = 'what does here';

```

I hope this helps you out. Let me know if you have any further issues

- Andrew
