0

I need to create a webform preview page for a client's website that uses many multipage webforms. The idea is to allow a preview so website users can prepare for the requirements of the form before they start.

I am currently extracting and re-printing the component data available via the webform_component_list() function, which is convenient but is very limited. The webform_component_list() function's purpose is for use in an email settings options list and preparing an email to be sent. Unfortunately I can't get it to display a hierarchy lower than the first level and their is no attribute data related to the form fields which I need to better loop through and add display formatting.

What functions/methods are available already through webform to access this dataset or do I need a DB query?

Picture of the limited formatting:

enter image description here

Note: I have looked through the webform module and various other files within the folder structure. I have already put work into this and have a working version, it just doesn't have enough data about the form structure to better layout the page during a loop. The purpose is a "webform preview page", i.e. a list of all components allowing users to see what they need. This is explained above. I would like insight from anyone who may have insight into the webform module.

  • Hm, so you are asking us to have a look through the Webform module and recommend some functions/methods to you for some purpose that's unclear to us? – leymannx Apr 22 at 16:24
  • Thanks for your reply @leymannx . I have looked through the webform module and various other files within the folder structure. I have already put work into this and have a working version, it just doesn't have enough data about the form structure to better layout the page during a loop. The purpose is a "webform preview page", i.e. a list of all components allowing users to see what they need. This is explained above. I would like insight from anyone who may have insight into the webform module. – Mark P Apr 22 at 16:41
  • 1
    Ah, i am noticing the webform structural data with all attributes is actually in the node array itself. I will feedback on the approach i use. Shucks, feel like a dunce. – Mark P Apr 22 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.