SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75! 
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Webform Customization

5 years 7 months ago #121880 by osbenji
Webform Customization was created by osbenji
Hi,

I currently have a webform which allows the user to rate a company based on 5 criterias (see image attachment).
This webform is composed of:
- Polymer Type: Select list; This is the type of company
- Polymer Producer: Select list, This is the company (this list is dependant and readjusted automatically depending on the type of company)
next in the webform we have 5 criterias (fivestar component) to rate the company on
- Quality: Fivestar component
- Regulatory Compliance: Fivestar component
- Delivery Performance: Fivestar component
- Communication: Fivestar component
- Innovation: Fivestar component
So far so good! I can submit my form in order to rate companies. I can also see the webform submissions thanks to Views module.
My main issue now is that i need to following functionality for my webform:
A user should only be able to submit the form more than 3 times for a same polymer type.
In other words the user shouldn't be able to submit the form if:
- If he is rating the same company twice (polymer producer field).
- If he is rating the 4th company within the same Polymer Type (so there can't be more than 3 submissions per Polymer type).
Basically i'am looking for a way to place a webform condition/validation based on previous webform submissions of the authentified user. If the user did already perform one of the two rules stated above then he shouldn't be allowed to submit the form.

Thank you!

PS: I'am aware that this functionality is very specific, but could you please let me know if there are any modules which can help me, or in worst case where and how can i write this code manually, or lastly if you know of a company which can do this for me (paid service). Thanks.


This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #121881 by osbenji
Replied by osbenji on topic Webform Customization
Mistype:
A user shouldn't be able to submit the form more than 3 times for a same polymer type.

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #121897 by Valentin
Replied by Valentin on topic Webform Customization
Hi osbenji,

I was thinking in the conditional features , however you want to apply conditions based on previously submitted forms. In that case, please take a look to this module . See if the features match your needs.

Looking forward to help you

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

5 years 7 months ago #121898 by steve
Replied by steve on topic Webform Customization
Hi osbenji

This is an intriguing custom and yes, it's very specific.

If you go to the "Form settings" tab of a Webform, you'll see there is a "Per user submission limit".


However, basing submissions on a particular field choice is a far more difficult task.

The inclusion of FiveStar is interesting. Are you actually using the Webform module and then using this to attach ratings? www.drupal.org/project/webform_fivestar

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #121899 by steve
Replied by steve on topic Webform Customization
This is an intriguing custom and yes, it's very specific.

If you go to the "Form settings" tab of a Webform, you'll see there is a "Per user submission limit".


However, basing submissions on a particular field choice is a far more difficult task.

The inclusion of FiveStar is interesting. Are you actually using the Webform module and then using this to attach ratings? www.drupal.org/project/webform_fivestar

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago - 5 years 7 months ago #121907 by osbenji
Replied by osbenji on topic Webform Customization
@Valentin:
Thanks for your message!
Yes i had looked into the conditional feature as well but it's not responding to my need.
As for the "Rules Webform Submitted" module, it's only avaiable for Drupal 6, not Drupal 7, so it won't work for my site.

@Steve:
Thanks for your message!
Yes i had seen the "Per user submission limit" but unfortunately this doesn't stop the user if he wants to vote twice for the same company or submit more than 3 votes per Polymer Type (field 1).
Yes i'am using the webform-fivestar module in order to have a fivestar component within my webform.


@Valentin and @Steve:
Is there any possibility for OS Training to program this functionality for us? We would be willing to pay of course.
Alternatively, do you know of any different approach (different modules, different logic) that could provide me with a solution.

PS: If it helps i also provide you in attachment a printscreen of my views, these views fetch the webform submissions and display them in a comprehensible way for analysing the overall votes.

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #121910 by steve
Replied by steve on topic Webform Customization
Hi osbenji

In terms of different ideas, one approach that might work here is to test the Entityform module or even just a normal content type. Both of those are more tightly integrated into Drupal than the Webform module is.

With Webform having a non-standard approach, it doesn't integrate well with many important modules.

By using default Drupal fields, you expose much of the power of Rules. I think Rules might be the best approach to creating this limit.

Please Log in to join the conversation.

5 years 7 months ago #121952 by osbenji
Replied by osbenji on topic Webform Customization
Hi,

Thanks for your message.
Does OS Training provide a paid service, where it could program this functionality for us? (Following the Webform approach.)
Also, putting this issue aside i was wondering if you know of any solution for:
Having a Dialog box which shows up once the user clicks "submit", in this dialog box there would be an overview of the values the user provided in the webform as well as 2 buttons "confirm" (submit the form) and "cancel" (return to the form).

Thank you!!

Please Log in to join the conversation.

5 years 7 months ago #121961 by steve
Replied by steve on topic Webform Customization
Hi osbenji

Sorry, we don't do Drupal development, but we can recommend a couple of freelancers, if you'd like.

Here's the approach I'd try ...

Go to the "Form settings" area of your webform and look for the "Confirmation message":



You can put tokens inside here. That would allow you to display the values the user provided:



The tricky part then would be placing it inside a pop-up box. You could perhaps install Colorbox and theme the webform itself ot place rel="colorbox" onto the Submit box: www.ostraining.com/blog/drupal/colorbox-drupal/

This message has attachments images.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #122022 by osbenji
Replied by osbenji on topic Webform Customization
Hi Steve,

Fantastic.

Oh Yes i'am very interested if you know any Drupal freelancer/expert, thanks.

One more question, in my webform i have a field of type "Select options", prepolulated (Load a pre-built option list) thanks to a custom module i found on the internet for accomplishing this need. The script of this module simply takes the "Title" of all the content types "Polymer T" and places them in the select options field (which is displayed as a selectbox).
So far so good. But now i need for this list to be ordered alphabetically - do you know of any module or script i can include into Drupal to order alphabetically this select field?

Thank.
B.

Please Log in to join the conversation.

5 years 7 months ago #122023 by osbenji
Replied by osbenji on topic Webform Customization
To be a little more precise:

The field i'am talking about is "Select Polymer Producer". This field is prepopulated thanks to the module i was mentioning and the reason for this is because the Polymer Producer list adjusts or differs depending on the Selected Polymer Type (for every Type, we have a different list of Producers basically).
So the module fetches the Title of a content type with all Producers and displays in the select box only those that are for the correct Polymer Type.

My question is basically, do you know of any module or technique to order alphabetically a Select options field?

PS: Link to the module: www.ishwor.info/dynamic-dependent-drop-d...-drupal-7-webform-3x

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #122045 by Valentin
Replied by Valentin on topic Webform Customization
Hi osbenji,

Please check the list of recommended developers in this page . You can email them for a quote.


My question is basically, do you know of any module or technique to order alphabetically a Select options field?

May you elaborate. Those fields are populated with a taxonomy?

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!