Custome Forms

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
7/21/2008 9:04:34 AM
Gravatar
Total Posts 72

Custome Forms

Hi -

Anyone have any Forms for Dummies methods of adding a custom form to mojo.  I have created a website which is all but complete - only thing missing is a hefty booking form which once submitted only sends data via email - nothing is saved to database.  I don't want the users to see a completely different looking page to the rest of the mojo portal site I have set up and don't really want to create a static page to look the same - lot of work.  Would want users to see the booking form on a page like any other content - ie. they could easily click a link and go to another page.  Is there a way of creating a HTMl module or something like that, where you can point to a static page of a form - sort of like framing I guess.

Any help greatly appreciated - its the only thing preventing me making this website live

Chris

 

7/22/2008 12:51:51 PM
Gravatar
Total Posts 18439

Re: Custome Forms

Hi Chris,

As mentioned in this thread, I plan to implement a form wizard within the next few months and it will be on sale in the soon opening mojoportal store.

Best,

Joe

7/23/2008 8:18:24 AM
Gravatar
Total Posts 72

Re: Custom Forms

Hi Joe

I saw that thread - just wondering what a workaround is in the meantime - rather than redirecting the user to a completely seperate page or is that the only thing I can do.

Chris

 

 

7/23/2008 8:26:08 AM
Gravatar
Total Posts 18439

Re: Custome Forms

I don't have any easy workarounds. If you're developer its fairly easy to create a custom feature that you can plug in. If you have Codesmith, you can generate a starter module control using my templates under the CodeSmithTemplates/Codesmith4x folder. Then add your custom inputs and write your code to send the email when the button is clicked.

Hope it helps,

Joe

7/29/2008 7:29:56 AM
Gravatar
Total Posts 72

Re: Custome Forms

Didn't see the Iframe module - answer to my problem - build seperate form and put it inside an iframe - easy.

7/30/2008 1:16:19 PM
Gravatar
Total Posts 18439

Re: Custome Forms

I just added a Codesmith template that can generate a starter SiteModuleControl using inline code instead of a codebehind file, so its all contained in one file. I suspect this is the easiest point of entry for a new developer to implement a custom mojoportal feature. I still generally prefer the code behind/compiled into the dll in the bin model, but some may find the inline code approach easier to understand. Using the new Codesmith template you an generate one using your own class names and file names but really you could juts edit this which is an example of the generated control:

<%@ Control Language="C#" ClassName="MyCustomSiteModule.ascx" Inherits="mojoPortal.Web.SiteModuleControl" %>

<%@ Import Namespace="mojoPortal.Business" %>
<%@ Import Namespace="mojoPortal.Business.WebHelpers" %>
<%@ Import Namespace="mojoPortal.Web.Framework" %>
<%@ Import Namespace="mojoPortal.Web.Controls" %>
<%@ Import Namespace="mojoPortal.Web.Editor" %>
<%@ Import Namespace="mojoPortal.Net" %>

protected override void OnInit(EventArgs e)
{
base.OnInit(e);

}

protected void Page_Load(object sender, EventArgs e)
{

LoadSettings();
PopulateLabels();
PopulateControls();

}

protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "Hello Web";
}

private void PopulateControls()
{
TextBox1.Text = "Click the button";

}


private void PopulateLabels()
{

}

private void LoadSettings()
{

// TODO: if yous feature has an edit page link to it here
//Title1.EditUrl = SiteRoot + "/MyClassEdit.aspx";
//Title1.EditText =

Title1.Visible = !this.RenderInWebPartMode;
if (this.ModuleConfiguration != null)
{
this.Title = this.ModuleConfiguration.ModuleTitle;
this.Description = this.ModuleConfiguration.FeatureName;
}

}

</script>

<mp:CornerRounderTop id="ctop1" runat="server" />
<asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper linksmodule">
<portal:ModuleTitleControl id="Title1" runat="server" />
<asp:Panel ID="pnlMyClass" runat="server" EnableViewState="false" CssClass="modulecontent">

Your custom form goes here.
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />

</asp:Panel>
<div class="modulefooter"></div>
</asp:Panel>
<mp:CornerRounderBottom id="cbottom1" runat="server" />

Its a basic hello world example that you can modify to create a custom feature. You would then drop the control into the Web/Modules folder then "install" it from (Key icon) Administration Menu > Advanced Tools > Feature Installation by entering a nem for it and the path to the control.

So you would just add whatever needed asp.net controls and code to capture your data and send an email.

Hope it helps,

Joe
 

9/29/2008 10:07:26 AM
Gravatar
Total Posts 18439

Re: Custome Forms

Form Wizard Pro is now available for creating easy form in mojoPortal.

Best,

Joe

10/13/2008 6:51:34 PM
Gravatar
Total Posts 72

Re: Custom Forms - Form Wizard

Hi

Having purchased Form Wizard and so far so good.  Just have some queries though - I am trying to recreate some forms I had on a website which are really long.  When I do them in Form Wizard they are even longer.  Although they are long, I don't want to make them look longer.  Is it possible to be able to put the Question Title to the left and the Question field (data entry box) to the right all on one line - this will half the length straight away.  The other thing I have on my forms is section headers - eg.  First Section is "About You" which the client completes personal details about themselves.  This makes the form look a whole lot better and also gives my clients an idea on what the data is for.  Is this possible to add to Form Wizard - maybe where you can Add a Question you could have a feature which is called Section Header.  Also noticed on the excel spreadsheet of form submission results, you don't get the name of the question in the header - it just says q1, q2, q3.  If you don't remember what the questions where (the non obvious ones) you have to keep referring back to the website to see what they were and count down to that question.  Also UTC time - can this be set to the local time of the user?

One last question - I have about 5 versions of the same booking form with some slightly different questions on each - is it possible to make copies of the booking form I have already completed but each form is treated seperately.

In previous job we had a form builder - some of the features you may want to think about which were great were

- Able to restrict a text box to allow only so many characters entered
- Assign a type to a text box - ie.  Text (characters and number), Numbers only, Phone field, Email field (did a check to see if was in email format), etc
- Subject line for email sent with form details.
- View all details of form submission online - search, delete, etc

10/13/2008 6:53:17 PM
Gravatar
Total Posts 72

Re: Custome Forms

Sorry - noticed that the field names are put in the excel spreadsheet - doh - disregard that - didn't notice with all the test submissions.

10/14/2008 5:58:45 AM
Gravatar
Total Posts 18439

Re: Custome Forms

Hi Chris,

Thanks a lot for your feedback.

Is it possible to be able to put the Question Title to the left and the Question field (data entry box) to the right all on one line

Not currently. You can style it with css but there is a hard break after the label. I will look into making it more flexible in a futre version.

section headers?

Not currently. That sounds more like a Survey than a Form to me. I am considering future improvements to Form Wizard so it can be used as a Survey or a Form.

Also UTC time - can this be set to the local time of the user?

Which user? The user viewing the data in Excel or the user submitting the form? How can we know the user's timezone for sure? Using Utc we know exactly what time it was and we can adjust to different time zones later. We can know the admin user's timezone and could transform to that on export. I will consider adding a setting for that in a future release.

One last question - I have about 5 versions of the same booking form with some slightly different questions on each - is it possible to make copies of the booking form I have already completed but each form is treated seperately.

Not currently, but I will consider implementing an option so that new forms can be created by copying an existing one as a starting point.

- Able to restrict a text box to allow only so many characters entered
- Assign a type to a text box - ie.  Text (characters and number), Numbers only, Phone field, Email field (did a check to see if was in email format), etc
- Subject line for email sent with form details.
- View all details of form submission online - search, delete, etc

All good ideas. I will keep them in mind for future improvements.

Best,

Joe

10/14/2008 6:13:25 AM
Gravatar
Total Posts 18439

Re: Custome Forms

Actually, I just figured out a way to remove the line break after the label from css.

If you edit the styleformwizard.css file and add this at the bottom:

.formwizard .settingrow .settinglabel {width:200px;  }
.formwizard fieldset .settingrow br.clear{display: none;}

Then refresh the page. Might need to clear the browser cache as well.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.