Friday, April 2, 2010

Present instances in the order they are...

I created this template for teachers to create assessment items. When they click the Add Question Set button, they get a set of buttons for each type of?question. Right now, regardless of what order they click the buttons, the instances of the question subforms show up in the order they are laid out in the designer, and all the questions of one type stay together. I need the question types to appear in the order the buttons are clicked. How do I do this? I have attached my form.

Thanks!

Present instances in the order they are...

tltagami,

The only solution I can see at this point is to create a big subform that contains all 9 button subforms.

All 9 subforms in the huge subform would be hidden.

You would hide the huge subform.

You may want to remove the 9 button group from the huge subform.

When you click on any of the 9 buttons you would want the following to occur:

1. Create an instance of the huge subform.

2. Unhide the subform that the button references.

This would go on for as many questions as required. This would allow you to create a specific space for each question to open in and it would be in order of the huge subform instances.

Hope that makes sense.

Rick Kuhlmann

Present instances in the order they are...

This makes sense to me; unfortunately, it's not working. I've tried a few different ways.

I set the inclusive subform to hidden and then used this script on the button to show just the particular subform I wanted:

xfa.form.assessment.Questions.Questionset._Questiondetail.addInstance(1);
xfa.form.assessment.Questions.Questionset.Questiondetail.MCdetail.presence=''visi ble'';

I set the inclusive subform to visible and all the internal subforms to invisible and used the same script:

xfa.form.assessment.Questions.Questionset._Questiondetail.addInstance(1);
xfa.form.assessment.Questions.Questionset.Questiondetail.MCdetail.presence=''visi ble'';

I set everything to visible and then used this script to try to hide the ones I don't want to see:

xfa.form.assessment.Questions.Questionset._Questiondetail.addInstance(1);
xfa.form.assessment.Questions.Questionset.Questiondetail.MSdetail.presence=''invi sible'';

xfa.form.assessment.Questions.Questionset.Questiondetail.Matchingdetail.presence =''invisible'';

xfa.form.assessment.Questions.Questionset.Questiondetail.SAdetail.presence=''invi sible'';

xfa.form.assessment.Questions.Questionset.Questiondetail.TFdetail.presence=''invi sible'';

xfa.form.assessment.Questions.Questionset.Questiondetail.orderingdetail.presence =''invisible'';

xfa.form.assessment.Questions.Questionset.Questiondetail.FIBdetail.presence=''inv isible'';

Then I realized what the problem is. I can't set the inclusive subform (xfa.form.assessment.Questions.Questionset.Questiondetail) to ''positioned''. It needs to be ''flowed'' because the subforms within it for each question type have to be able to expand. As long as it's not ''positioned'' I can't call instances of it, right? Is there a way around this?

OK, so now I am able to call show just the subforms I want, but it's still not putting them in order.

My form is attached. In Preview, you scroll down and click ''Add a Question Set'', then click the type of question you want to add.

Thanks for your help!

Hi Rick -

There wasn't anything in that last post.

No comments:

Post a Comment