Hi everyone,
I want to create a webform with conditional fields, and because new webform hasn't been released yet, I tried with CCK. I created a content type with many conditional fields.
The problem is that I would have to grant permissions to edit this form to anonymous users if I wanted them to contact me this way. Since this is a content type, I would need to grant permissions to edit the content type. I don't want to do this, because there are fields I don't want to be displayed to anonymous users, such as Title, Menu etc. What is more, after "sending" this form, a node would be created.
In short:
- the form creates a node instead of sending me an e-mail. (I don't want it to create a node)
- the form has unnecessary fields such as title, menu, etc.
I tried the dev version of webform, but I couldn't make it work. ( I used beta6 with dev version of webform conditional)
And my question is: what should I do to make it work like an ordinary webform? Do you know any tutorials available on the Internet?
Thanks in advance,
oruen
Comments
What do you mean by
What do you mean by conditional fields?
Depending on how complicated it is you want you can program this into the webform module.
For example hide certain fields if a condition is not met by jQuery or similar.
--
tour package
Conditional fields
By conditional fields I mean that some fields show up when a particular value in other fields is chosen.
F.e. fields x, y, z
if field x = 1, y shows up
if field x = 2, z shows up
I'd love to have it in webform, but how can I program this into that module? What should I do?
Thanks,
oruen
Have you tried this:
Have you tried this: http://drupal.org/project/webform_conditional ?
As I said if there are not too many conditions you can use jQuery. For example I put this javascript block in the description of the webform:
<script type="text/javascript">$(document).ready(function() {
$("#webform-component-from").hide(); // hide the field initially
$("#edit-submitted-travel-flights").blur(function() { //when the conditional checkbox is clicked (should use .change() really)
if ($(this).val() && $(this).val() != 'None') { //if it is clicked
$("#webform-component-from").fadeIn("slow"); //show the field
} else {
$("#webform-component-from").slideUp("fast"); //otherwise hide it
$("#edit-submitted-travel-from").val(""); // and delete what was written in the text field.
}
});
});
</script>
--
tour package
I've already tried webform
I've already tried webform conditional, it doesn't work in my drupal - I had several warnings. What's more, it works only with newest, beta6 version of webform.
Thanks for the idea with JS - maybe this will do the trick :)
Oruen
A couple of choices, there is
A couple of choices, there is the Webform Conditional module though it requires the beta version of webform 3
For nodes there is the Conditional Fields module. You can hide the node title with node auto title. Also, always test forms as a regular user, some of those fields (ex menu) will not show unless you have granted users access to those fields. You can use the rules module to send email, though the node is still storied as a node though I find that useful as it keeps a record that way of what was sent.
I'll give it a try, thanks
I'll give it a try, thanks :)
Oruen