I am looking for a Backdropper who can add what I'd call a ‘decision tree’ costing tool to a Backdrop CMS website for me - or at the least give me guidelines on whether or how it could be done. The client has a domestic heating business (here in the UK) and the 'decision tree' would enable users to select various options for replacing their existing heating installation (boiler type, location, radiators, valves and so on), a process that would end in a nicely formatted presentation - and an email being sent out to both site owner and site visitor - which summarised the choices and specified a cost estimate. (Think of this as a series of multi-choice questions in what used to be a 'wizard'.)

You can see examples of this in use by other businesses at:

This is nice opportunity for a Backdrop developer/designer to design an attractive system with neat functionality. (I'm too near to retirement to want to grapple with too much of this myself!) I'd be happy to discuss this in-forum or off-forum. It may have wider interest as a challenge which would be cool to see Backdrop meet. (If I was still using Drupal 7, I'm not sure where I'd start, so it's not clear to me whether this would be best achieved by starting with porting a D7 module or by writing custom code.)

Accepted answer

Hello.

I believe the Webform module ( https://backdropcms.org/project/webform ) can do most of what you are asking for, though I'm not entirely sure about the decision part.

If that module can do the decision part, you would probably want to port the Webform Ajax module ( https://www.drupal.org/project/webform_ajax ) to allow it to be done as an AJAX form.

If the Webform module cannot do the decision part, you could use the Form Wizard module ( https://backdropcms.org/project/form_wizard ), which is a port of the Drupal 7 Chaos Tool Suite (ctools) ( https://www.drupal.org/project/ctools ) Form wizard tool. There might also need some AJAX functionality ported, but I would have to look at what was ported to know. With this path, however, most or all of what you want would need to be custom coded. The Form Wizard tool requires that a custom module is created with all the form information in it. The tool itself just facilitates and handles the form and wizard functionalities. All of the other components (like the output at the end and the sending of the emails) will have to be added. (I'm pretty familiar with that tools, as I have presented on it at several Drupal Camps in the past.)

Regardless of the chosen path, there would need to be a fair amount of theming done for the forms, the output, and the emails.

Best regards,
Jason Flatt

 

Comments

oadaeh's picture

Hello.

I believe the Webform module ( https://backdropcms.org/project/webform ) can do most of what you are asking for, though I'm not entirely sure about the decision part.

If that module can do the decision part, you would probably want to port the Webform Ajax module ( https://www.drupal.org/project/webform_ajax ) to allow it to be done as an AJAX form.

If the Webform module cannot do the decision part, you could use the Form Wizard module ( https://backdropcms.org/project/form_wizard ), which is a port of the Drupal 7 Chaos Tool Suite (ctools) ( https://www.drupal.org/project/ctools ) Form wizard tool. There might also need some AJAX functionality ported, but I would have to look at what was ported to know. With this path, however, most or all of what you want would need to be custom coded. The Form Wizard tool requires that a custom module is created with all the form information in it. The tool itself just facilitates and handles the form and wizard functionalities. All of the other components (like the output at the end and the sending of the emails) will have to be added. (I'm pretty familiar with that tools, as I have presented on it at several Drupal Camps in the past.)

Regardless of the chosen path, there would need to be a fair amount of theming done for the forms, the output, and the emails.

Best regards,
Jason Flatt

 

Jason, if you'd be interested in discussing this solution further with a view to working on it, would you contact me, please?

Kind regards,

Rob

oadaeh's picture

I sent you a message via your contact form on the main site.

 

Many thanks @oadaeh for taking the trouble to identify two very promising ways of delivering this puzzle. I'm going to see how far this takes me away from my comfort zone (probably too far) and may well be back to ask if this is something that you'd be willing to work on.

In the meantime, if a webform or form wizard is the mechanism for storing responses in the database, I assume that the costing that followed that would result from custom code. That begs the question, in my mind, as to whether component prices (for boilers, radiators etc) would reside in the database for use by the webform - or would be within the custom code?

Good practice suggests that prices go in the database rather than in code, this being better for maintenance, which suggests a 'component' content type that serves that. Whichever of these two routes you've outlined is chosen, would you take such an approach on the storage of these 'component' costs?

Many thanks and kind regards,

Rob Tomlinson

 

oadaeh's picture

I'm sorry for the delay in responding -- I've been swamped the last few days.

For one-off projects that are primarily a fix it and get out type of operation, I generally prefer to try to come up with solutions that can be left in the hands of the site owner to maintain and manage.

Therefore, I think it would be better to try to utilize the Webform module as much as possible with a custom content type (and related content and maybe a view) to solve the problem. (If I were doing more long term maintenance and there was a lot of custom functionality on the site, I might prefer a Form Wizard option for the flexibility, but then the site owner would have less direct control of it.)

I suspect that once the decision tree is in place in a webform, that will not need modification, because that looks to be fairly standard and common across the industry.

However, I'm sure the solutions will change over time, and therefore, using a custom content type for just this one purpose would mean that the site owner could fairly easily just add, modify, or remove content to update the results as necessary.

 

Olafski's picture

I believe the Webform module can do most of what you are asking for, though I'm not entirely sure about the decision part.

Should be possible! Conditionals are part of Webform and are quite powerful.