‎2014 Oct 16 2:33 PM
Dear Experts,
I developed an adobe form which has a subform that contains more than 100 fields.
My requirement is to hide all initial fields, in other words, only display those fields that has value.
Now I'm able to do this using the follow javascript at event "initializate" of respective field.
if(this.rawValue == null){ this.presence = "hidden"; }
The problem is like I said, I have more than 100 fields.
Before I code it in each field, I would like to know if is there any way to do this once in the subform that replays to all fields.
I did not find any solution in the internet so far.
I appreciate any reply.
Best regards.
Vinicius Ostan
‎2014 Oct 16 6:00 PM
There are other ways but they would also involve same stuff as you are doing now with Java script .
There is one very sophisticated way but will take more time as described below :
You need to declare a table . Put all the fields with value in the internal table .
Pass this Internal table to the form and display. Make sure you make the sub form as flowed .
Thanks
Manik
‎2014 Oct 16 6:20 PM
Hello Manik,
I appreciate your reply.
You are telling to create an internal table and pass as parameter to adobe forms, right?
If yes, there is a problem, because almost all of those fields are editable.
My biggest problem is that I'm sure that the functional will request to modify the logic above (i.e. do not display when something else happens), so I'll have to modify this logic a lot of times for each field.
So, I'll wait a bit for someone else.
Thanks
Best regards
Vinicius Ostan
‎2014 Oct 16 10:09 PM
Hi Vinicius,
perhaps you can try to loop through all fields in the very beginning, but I never done that and I'm not sure if this will end in more trouble than doing the coding thing you already know about.
If this doesn't work, I'm pretty sure there is no other option than coding in all fields. You sound like you need each field seperate on the form, so I think there is no solution for you.
Sorry
Florian
‎2014 Oct 17 12:06 AM
If that is the case , you need to modify the code if you go for Java script also .
The advantage of having table is you dont have to add the code 100 times ( as you would have to do now ).
Put the code inside the loop and logic will be applied to all the fields / rows.
I hope I understood your issue correctly that function will come back tomorrow saying he wants to hide the field if value is so and so . (like we are hiding it now if value is blank ).
Thanks
Manik
‎2014 Oct 17 1:24 PM
Thank you all.
Manik, I understand what you mean,
Create a table that contains just one row.
I'll try this, as soon as possible will post result here.
Thank you.
Vinicius Ostan
‎2014 Oct 20 12:14 PM
Until now, I did not find any suitable solution.
I think the easier way is selecting all fields then copying and pasting the javascript code in each one.
I'll keep this topic open if anyone finds a solution.
Best regards.
Vinicius Ostan