Visible fields on document type? (show/hide)

Jon White asked on October 8, 2014 15:02

Hi there,

I have a document type with a large number of potential fields. We are adding content that will be different each time. i.e. One entry may have two images, another may have five.

So I have five image fields for the admin to potentially use.

Is there a simple way to hide unnecessary fields that won't be used but become visible if you fill in the previous field. So when I've entered two the third field appears etc..

I thought this could be done using visible condition etc.. but i had no joy.

Can anyone confirm if this can be done and how, I've looked at existing documentation and it didn't help.

Thank you

Recent Answers

Brenden Kehren answered on October 8, 2014 21:25

Depending on the type of data you're looking to store, you might be able to use the Attachments control with field type of Attachments. This will allow you to upload 0 to many files. Then in your transformation you can use the attachment viewer to display them. A good example would be a car listing with multiple images. Is this something like you're looking for? If so, I have a code sample.

0 votesVote for this answer Mark as a Correct answer

Jon White answered on October 8, 2014 22:34

Hi Brendan,

Thanks for the advice I may use this, however it was just an example of wishing to shorten the form as I'm entering research results, this data will come from 100+ people but some may have 1 piece of research and others have 5.

On the doc type I have to have 5 fields of html text fields in case but this becomes really long, so I just want some sort of logic that makes the next field appear when I type text in the first box, then the third appears if I type in the second. If you see what I mean, I have done this on wufoo forms using their 'field rules'.

Obviously this is not crucial but just thought would help usability and if it was possible (and easy) it'd be helpful.

It could be that i'm doing the whole concept wrong but to me it makes sense!

Thank you

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 9, 2014 13:38

IF you are asking/requiring the user to upload files then the Attachments control would be the way to go. If you are asking/requiring the user to physically type in data, I'd suggest using jQuery or create a custom form control to do this.

To get an idea of what the Attachments control does, go to a page, select Properties>Attachments and upload a few files. It dynamically continues to add as many or as few files as you want and only has one field on the document table with a relating field in the attachments table.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.