Just started to mess around with Contour (Loving it so far!) - And was wondering how I can edit the HTML on the forms? I have created a simple contact form but want to remove the H4 it adds as I have text above it in my template? and also remove the fieldset if I want to?
I have not started working with Contour yet, so this may be out of place, but just a suggestion. You could use jQuery to remove the element by using selectors. So, you would have to traverse the element until you find the h4 and then remove it:
$('#contourfomr row h4).hide();
Obviously that isn't the selector...but that should do the trick if you don't have access to the underlying template. Or, you could do it with a style rule too of course!
1) How can I create a few of the basic scenarios and have them show
up in the template list (the one that includes the basic "Contact Form"
and "Blog comment form") so that my user doesn't have to build the form every time from scratch?
Using the API, you can pull out the records by page. They're aggregated in the form page in Contour, but you could code your own page in the back end to list them by page. This is detailed on page 6 of the developer docs: http://umbraco.org/pro-downloads/Contour%20Developer%20Docs.pdf it should be possible to list the items assigned to the page, rather than all of the entries.
2) Isn't there a way to have the form picker just do that for me without having to take manually insert the macro?
The form picker DataType just holds a reference to the ID of the form. There are two ways to embed the form in the page:
use the macro button in the HTML editor. If you have that button turned on, the user can select "insert contour form" from the dropdown and add the form directly into the editor, same as using the picker. The form will also be previewed inside the HTML editor. Bear in mind that the area of the template that the copy os displayed in must be inside a server side form, or it won't display.
add the macro to the template, and pass the selected form in as a macro parameter, using square brackets syntax, e.g. [#propertyAlias] where propertyAlias is the alias of the form picker. Your macro would be something like: <umbraco:macro alias="umbracoContour.RenderForm" runat="server" formGuid="[#pageForm]" /> be aware that if there is no form selected, it will generate a pair of buttons. I get round this by creating a usercontrol that wraps the macro and hides it if there is no selected form.
3) What do I have to do for a form macro to display the form in the richText Editor?
You normally have to reload the form after you've inserted the macro to see the form I think.
4) Can't I just somehow make a given workflow a part of the article creation process
doctype so that by default, these types of forms will automically post umbraco documents
underneath the created article node?
You can't assign workflows to docTypes, they're part of Contour? The default workflow only allows you to publish the form to a specific node, but it's not that difficult to change that, I have a package for a custom workflow (with source code) that allows dynamic publishing nodes to be selected, you could easily modify that to suit your needs I think: http://our.umbraco.org/projects/backoffice-extensions/contour-workflow-save-to-page-specified-in-form-field
Thanks Tim, Your second answer to #2 got it done. For number one, I figured I can edit the umbracoContourConfig xml config file. Still trying to get my head around the xslt, but I'm going to check out the references in page 6 of the documentation as a guide.
Still can't get the forms to render in the RichText Editor.
Thanks for the link to your package...I'm gonna check it out. I hope I can get it working so that my users can just enter text and publish
No, I never did. Please post back if you get it. It's weird because I have an installation on a laptop and they did render, but the instalations at work don't. If I ever have the time, I'll hunt it down...too many other things..
Editing Contour Templates?
Just started to mess around with Contour (Loving it so far!) - And was wondering how I can edit the HTML on the forms? I have created a simple contact form but want to remove the H4 it adds as I have text above it in my template? and also remove the fieldset if I want to?
Thanks
I have not started working with Contour yet, so this may be out of place, but just a suggestion. You could use jQuery to remove the element by using selectors. So, you would have to traverse the element until you find the h4 and then remove it:
Obviously that isn't the selector...but that should do the trick if you don't have access to the underlying template. Or, you could do it with a style rule too of course!
Thanks,
Nik
You can click the formname in the formbuilder UI to edit it, leave it blank to remove the h4
The fieldset elements cannot be removed from the rendering, but you can set their borders, margins and padding to 0 and they will not be visible
Hi,
I am new to Umbraco and I am trying to use Contour and the "Form Picker" in a document type I have set up to allow users
of the system to post articles which may or may not have a form attached to them. There are three basic scenarios with
different forms, with the possiblity of additional scenarios requiring a custom form. One of the basic scenarios referred to
above will have dozens of instances. Although each instance of a scenario may use the same form, I need to have a seperate
instance of each form. I want the user that creates an article to be able to login to the system and be able to just review
the form entries for that article. So my first question is:
1) How can I create a few of the basic scenarios and have them show up in the template list (the one that includes the basic "Contact Form"
and "Blog comment form") so that my user doesn't have to build the form every time from scratch?
I realize that after creating a form, it is available through the form picker. But choosing the existing form that way would combine
the results from other articles in the same Entries list. What would be better is if the user could select a basis scenario type
that I create, and then name the instance to match their article.
My seconnd question has to do with the form picker. I have a doctype that includes the form picker. What I haven't figured out
is why the form created through the form picker doesn't show up in the bodyText I provide. What I end up doing is creating
the form through the form picker, then, as a second step I insert a macro using the "insert form from umbraco contour"
selection.
2) Isn't there a way to have the form picker just do that for me without having to take manually insert the macro?
My third question has to do with the WYSIWYG presentation of a form marco that displays in the RichText Editor.
In videos that I have watched, after the document is published, the form is rendered and displayed in the Editor.
I do see that there are checkboxes in the macro properties to "use in editor" and "render content in editor" but
it still won't render in the editor.
3) What do I have to do for a form macro to display the form in the richText Editor?
My fourth and last question has to do with adding a workflow for a submitted form. I really like the feature that
allows a submitted form to be poasted as an umbraco document. I put these documents under the articles
created so that the article creator has quick and easy access to check out their submitted forms. It isn't a
big deal for me to do that. But with ten or so users posting several articles a day, I don't want them to have to go through
the process of setting up workflows.
4) Can't I just somehow make a given workflow a part of the article creation process
doctype so that by default, these types of forms will automically post umbraco documents
underneath the created article node?
I am willing to learn, but I've been playing with these four questions for several days and I can't see the answer.
If anyone could point me in the right direction with any of these. I'd sure appreciate it.
1) How can I create a few of the basic scenarios and have them show up in the template list (the one that includes the basic "Contact Form"
and "Blog comment form") so that my user doesn't have to build the form every time from scratch?
Using the API, you can pull out the records by page. They're aggregated in the form page in Contour, but you could code your own page in the back end to list them by page. This is detailed on page 6 of the developer docs: http://umbraco.org/pro-downloads/Contour%20Developer%20Docs.pdf it should be possible to list the items assigned to the page, rather than all of the entries.
2) Isn't there a way to have the form picker just do that for me without having to take manually insert the macro?
The form picker DataType just holds a reference to the ID of the form. There are two ways to embed the form in the page:
3) What do I have to do for a form macro to display the form in the richText Editor?
You normally have to reload the form after you've inserted the macro to see the form I think.
4) Can't I just somehow make a given workflow a part of the article creation process
doctype so that by default, these types of forms will automically post umbraco documents
underneath the created article node?
You can't assign workflows to docTypes, they're part of Contour? The default workflow only allows you to publish the form to a specific node, but it's not that difficult to change that, I have a package for a custom workflow (with source code) that allows dynamic publishing nodes to be selected, you could easily modify that to suit your needs I think: http://our.umbraco.org/projects/backoffice-extensions/contour-workflow-save-to-page-specified-in-form-field
Hope that's useful!
:)
Thanks Tim,
Your second answer to #2 got it done.
For number one, I figured I can edit the umbracoContourConfig xml config file.
Still trying to get my head around the xslt, but I'm going to check out the
references in page 6 of the documentation as a guide.
Still can't get the forms to render in the RichText Editor.
Thanks for the link to your package...I'm gonna check it out. I hope I can
get it working so that my users can just enter text and publish
Jacob
Did you get an answer to your question #3?
I am having the same issue.
No, I never did. Please post back if you get it. It's weird because I have an installation on a laptop and they did render, but the instalations at work don't. If I ever have the time, I'll hunt it down...too many other things..
Comment author was deleted
@Sar @Jacob, check the 'insert form from contour' macro, does it have the render in rte checkbox checked?
yes, mine does.
@Tim: I have the same rendering issue. I too have the render in rte checkbox checked.
Umbraco\Plugins\umbracoContour\Views\Form.cshtml ?
is working on a reply...