4

I am using UmbracoCMS and Contour_1.1.12 While creating multi step forms, i need to dynamically decide, which form will be visible in the next step, based on certain field values the user has provided in the previous step.

For example in contour multi-step forms, there is a step in which user has to provide input using a checkbox field. After filling the form in this step the user will click the Next button to move to the next step. Now i want to either display or skip the next step based on whether the user selected the checkbox or not.

Many thanks.

amelvin
  • 8,919
  • 4
  • 38
  • 59
user1344502
  • 75
  • 1
  • 1
  • 8

3 Answers3

0

I think you might be able to do this by hooking into the Contour event model/Workflows. The Contour developer docs have some useful info on creating workflows and can be downloaded from here.

Tim
  • 4,217
  • 1
  • 15
  • 21
  • 4
    Hi. Thanks for your reply. hooking into the Contour event model or Workflows didn't work for me. I was able to match the field values but there wasn't any functionality to skip the countour page. Currently i am doing it by adding some inline code in RenderForm.ascx and extending some FieldTypes (Drowndownlist, RadioButton List). I replaced the actual event handler for Next and Previous Click with my own and called the actual method nextPage(sender, e) from inside my handler after making decisions based on my extended controls value. – user1344502 May 07 '12 at 07:54
0

I've had some difficulties hooking into the workflow model - I'm not sure that its entirely bug free! I would use javascript/jquery to hide or display the next field as an interim measure.

  1. page load (http://api.jquery.com/ready/) -> show dropdown / hide optional question
  2. dropdown changes (http://api.jquery.com/change/) -> decide whether to show/hide optional question
amelvin
  • 8,919
  • 4
  • 38
  • 59
0

Sorry for the late reply but you can always use USERCONTROLS to do this type of work.. Create User Control in different project, test them based on your flow and then use it in umbraco by creating macros.

see this link for the same that explain how to use it.

Jigar Pandya
  • 6,004
  • 2
  • 27
  • 45