Skip to main content
Inspiring
Jan 28, 2019 6:26 AM UTC
Answered

Filling form data using a button

I am attempting to fill multiple form entries (mostly text boxes, some drop-downs) using a button.

The button is correctly resetting the hidden fields which generate the required random numbers, but attempting to change other field values is where it's breaking.

I'm using:

this.form.elements("Fel_Roll").value=Fel;

I've also tried

this.getField("Fel_Roll").value=Fel;

Fel is holding the random number and Fell_Roll is the field I want to have it input into IF the button is pressed.

I have also attempted it without the reset function, simply using the values currently in the (will be) hidden fields.

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Jan 28, 2019 7:38 PM UTC

Check the JS Console (Ctrl+J) after clicking the button...

5 replies

try67
Community Expert
Community Expert
Jan 28, 2019 8:57 AM UTC

Post your full code, please, or (better yet) share the actual file with us (via Dropbox, Google Drive, etc.), please.

Translate
Inspiring
Jan 28, 2019 5:39 PM UTC

Dark_Heresy_Sheet_3p_Editable.pdf - Google Drive

There you go. It's the "Roll All" button on the top left.

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Jan 28, 2019 7:38 PM UTC

Check the JS Console (Ctrl+J) after clicking the button...

Translate
Bernd Alheit
Community Expert
Community Expert
Jan 28, 2019 7:43 AM UTC

Any error in the Javascript console?

Translate