You are viewing limited content. For full access, please sign in.

Question

Question

PDF not populated from textbox on form

asked on December 20, 2018

I have a read-only textbox on a form that is populated with the number of rows in a table. When I submit the form, it sends an email and creates a PDF from the form fields. However, the textbox that holds the number of rows is empty in the PDF. Is there a setting that I'm missing, or could it be something in the process?

0 0

Answer

SELECTED ANSWER
replied on December 20, 2018

If they are all text, then I would do the following:

  1. Add a 5th column with a Number type
  2. Under functions, set it's value to =ROW()
  3. Change the COUNT function to reference that new column
  4. Switch to the Field Rules tab
  5. Set HIDE (the number column) ALWAYS

 

Now that column will give you want you need to count the rows, it will be invisible to the user, and you won't have to deal with the workarounds associated with changing read-only field values via JavaScript.

1 0

Replies

replied on December 20, 2018 Show version history

What are you using to populate the field? If you're using JavaScript, then Forms will not retain the updated value because the field is read-only.

If that is the case, there's actually an easier way. Use a Function instead. Go into the advanced tab for your row count field and use the following function

=COUNT(Table.Column)

Replace "Table.Column" with any of the columns for your table. Functions will auto-update, and they will be saved even if the field is read-only because it is an "internal" process.

1 0
replied on December 20, 2018

This is a dynamic table that can have rows added and removed, not sure that makes a difference. The textbox doesn't update as I add or remove rows, it just shows 0 the whole time. The PDF still shows 0 for the total when I submit the form. I did have javascript modifying the value automatically, but I've commented that out for now. I also have an Approval form that does have the correct number of rows in the textbox.

0 0
replied on December 20, 2018 Show version history

What is the exact function you put in? It still works with dynamic tables (I've used this approach many times).

You have to fill =COUNT() with a column variable from your table.

1 0
replied on December 20, 2018

=COUNT(Household_Member.Name)

0 0
replied on December 20, 2018 Show version history

I think I figured it out, it is not counting text fields, but I have other solutions. Do you now how to create a hidden column in your table?

 

1 0
replied on December 20, 2018

There are four columns, and none of them are required.

0 0
SELECTED ANSWER
replied on December 20, 2018

If they are all text, then I would do the following:

  1. Add a 5th column with a Number type
  2. Under functions, set it's value to =ROW()
  3. Change the COUNT function to reference that new column
  4. Switch to the Field Rules tab
  5. Set HIDE (the number column) ALWAYS

 

Now that column will give you want you need to count the rows, it will be invisible to the user, and you won't have to deal with the workarounds associated with changing read-only field values via JavaScript.

1 0
replied on December 20, 2018

Yep, that works! Thank you again!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.