Contact Form Modification

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/23/2009 3:23:50 AM
Gravatar
Total Posts 70

Contact Form Modification

 

Hello,

I want to edit the Contact Form that it has a multiple Subject presented in an Optionlist that when the user select a specific Subject it sends to its corresponding email recipient.

Ex.

Subject                Recipient

About the Sub     about@about.com

How to Dance     dance@dance.com

 

How can I implement this? Help please.

Your help will be greatly appreciated.

Thank you.

11/23/2009 5:26:07 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

Hi,

Sorry ,currently not support this feature but you can add a page for any recipients and add on instance of the Contact Form on it.

Hope Helps,

Asad

11/24/2009 4:05:41 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello Asad,

You said;

 - you can add a page for any recipients --How do I execute these? What are the files involve in adding a page?



-add on instance of the Contact Form on it. - How do I do it?

 

Your help will be greatly appreciated.

 

Thank you.

 

 

11/24/2009 4:18:40 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

Hi,

1- Add a page to your site and name it "Contact Us" for example.

2- Add another page under "Contact Us" and name it "Support" for example.

3-Add another page under "Contact Us" and name it "Sales" for example.

4- Go to the "Support" page and add a Contact Form Module instance  on it.

5- Go to the "Sales" page and add a Contact Form Module instance on it.

Hope Helps,

Asad

12/1/2009 9:53:25 PM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello,

I have a created different instances of contact form on

Products page

Services page

How will I configure that everytime the user Use Product page Contact form it sends to product@product.com

and if it use the contact form on the Services it sends to servcice@services.com

 

 

Your help will be greatly appreciated.

 

Thank you.

12/2/2009 4:40:23 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

Hi,

In the Products page click gear icon(or setting link ) on top of the Contact Form instance to see the settings of the Contact Form instance then enter product@product.com in the email section.

n the Services page click gear icon(or setting link ) on top of the Contact Form instance to see the settings of the Contact Form instance then enter servcice@services.com in the email section.

Hope Helps,

Asad

12/2/2009 9:06:26 PM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello,

the Email Address section does not have textbox where I can type in the email address.

I try configuring it on :

Advanced Tools > Feature Installation/Configuration > Contact Form > Feature Settings

ContactFormEmailSetting . I change the control type from ISettingControl to Textbox

and also added the following on Regex Validation Expression (\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)

then Update but the changes I made does not have any effect.

 

How can activate the textbox so that I can input Email Address.

 

Thank you for your great help.

Cesse

12/3/2009 12:27:55 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

Hi Cesse,

I did told about the pages that you created.

This is strange for. I think this is a skin issue that you can't see the Email Address textbox. So please change your skin and try again.

If you have an online url , I can see it.

Best,

Asad

 

12/3/2009 12:41:52 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello Asad,

We managed to display the textbox on email address part.

try configuring it on :

Advanced Tools > Feature Installation/Configuration > Contact Form > Feature Settings

ContactFormEmailSetting . I change the control type from ISettingControl to Textbox

and also added the following on Regex Validation Expression (\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b).

I think the changes was applied on the new instance of the conttact form.. not on the contact form added before the configuration.

One more thing we did was delete the existing contact form and add a new one.

Thank you greatly.

Cesse

12/3/2009 1:00:37 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello again,

I try to input my email address on the textbox and save but it does not save the email address that I type.

on the Advanced Tools > Feature Installation/Configuration > Contact Form > Feature Settings  

REsource File: ContactFormResources

Setting Key: ContactFormMAilSetting

Control Type: Textbox 

Control Source: (Empty textbox)

Setting value:(Empty textbox)

Sort Order: 100

 

Is the mailsetting correct?

Your help is greatly appreciated.

Thanks.

Cesse

12/3/2009 1:29:39 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

You NO need to go to dvanced Tools > Feature Installation/Configuration > Contact Form > Feature Settings

You must go to you pages that you created.

Do you added Contact form on your pages?

 

12/3/2009 1:39:09 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Yes I already added contact form on my page.

Set the Email Address to (p.decf@yahoo.com)

It renders the message succeffully sent.

It goes to my Spam Emails.

 

Help please.

Thanks.

12/3/2009 1:44:12 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

See this sections in web.config:



<!-- ******* email settings

Note you also need to specify smtp settings further below in system.net section the settings here appply to features but

the settings in the system.net.mailsettigns section are used by site registration and password recovery -->

 

<add key="DisableDotNetOpenMail" value="true" />

<add key="SMTPServer" value="localhost" />

<add key="SMTPRequiresAuthentication" value="false" />

<add key="SMTPUseSsl" value="false" />

<add key="SMTPPort" value="25" />

<add key="SMTPUser" value="UserName" />

<add key="SMTPPassword" value="UPassword" />

<add key="SMTPTimeoutInMilliseconds" value="30000" />

<!-- leave this blank for ascii encoding, allowed values are utf-8, utf-32, and unicode -->

<add key="SmtpPreferredEncoding" value="" />

 

 

<!-- ******* end email settings -->

 

 



<mailSettings>

<smtp from="noreply@yourdomain.com">

<network host="localhost" port="25" password="" userName="noreply@yourdomain.com" />

</smtp>

</mailSettings>

12/3/2009 2:00:09 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello Asad,

I have the same email settings.

I receive my mails but it goes to my Spam Folder.

Thank you.

12/3/2009 2:06:17 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello Again,

I notice on my Link and Blog module when I try to add post I have this error.

 

We're sorry but a server error has occurred while trying to process your request.

The error has been logged and will be reviewed by our staff as soon as possible. It is possible that the error was just a momentary hiccup and you may wish to use the back button and try again or go back to the home page.

 

What can be causing these?

Your help is greatly appreciated.

 

Thank you.

 

12/3/2009 2:14:35 AM
Gravatar
Total Posts 550

Re: Contact Form Modification

Hi,

First of all please request new question as a new topic .

But for this error you can see log of system from administration Menu and paste it here. I may can help you.

Best,

Asad

12/3/2009 2:19:48 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello,

Ok I'll post new topic for this.

Thanks for the great help.

Cesse

6/27/2010 10:25:30 PM
Gravatar
Total Posts 70

Re: Contact Form Modification

This issue has been solve using MojoPortal 2.3.4.4 . Upgraded my Mojo version installed.

 

Thanks

6/27/2010 10:38:58 PM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hello Joe & Asad,

 

Is there a way that I can change the textbox to perhaps a textarea on  Contact Form Feature Instance Settings on the following:

           Email Address to Receive Submissions 

           Display Alias For Receiving Email Address

 

I have to input MORE THAN 255 characters and the textbox can only accept 255 characters of user input.

 

Your help will be greatly appreciated.

 

Thanks 

 

Cesse

6/28/2010 8:36:02 AM
Gravatar
Total Posts 18439

Re: Contact Form Modification

You are mistaken there is no 255 character limit on those settings, but no we will not use textarea there. If you need to customize it further you should clone it and build your own contact form, it is not a complicated feature, it should be fairly easy for a developer to make your own feature similar to our contact form.

Best,

Joe

7/6/2010 5:15:05 AM
Gravatar
Total Posts 70

Re: Contact Form Modification

Hi,

This is on the Contact Form Feature Instance Settings :

The text box for Email Address to receive Submissions and Display Aliases for receiving  Address can only hold 250 character of user input by Default, I have to input more than 250 characters. 

Can I change the text box to text area? Or any suggestions? 

 

Thanks.

 

 

Cesse

11/22/2011 11:41:00 PM
Gravatar
Total Posts 8

Contact Form customization

Hello,

Yes I already added contact form on my page.

How can i dynamically change the form fields Like this

First Name*
Last Name*
Company Name*
Email*
Phone number*
Select country*
State*
Comments*

Please help.

Thanks,

Yusuf

 

11/23/2011 7:35:01 AM
Gravatar
Total Posts 115
mojoPortal Community Expert

Re: Contact Form Modification

You cannot modify the fields using the standard contact form. The best way is to purchase Form Wizard Pro here or to clone the contact form and customize it.

11/23/2011 7:36:42 AM
Gravatar
Total Posts 18439

Re: Contact Form Modification

Hi,

You would either need to implement your own custom feature or you could purchase my add-on product Form Wizard Pro.

You should not modify the code in any existing features

Hope that helps,

Joe

3/1/2012 6:16:51 PM
Gravatar
Total Posts 104

Re: Contact Form Modification

Is the process for cloning a page described anywhere?  Just not sure what files are needed where or what files are needed to be copied...

Thanks! : )

3/1/2012 6:43:58 PM
Gravatar
Total Posts 2239

Re: Contact Form Modification

Hi,

Do you mean cloning a feature? If so, you can read about that here. That article discusses cloning entire features which includes supporting pages for features.

If you mean, "How do I clone a CMS Page?", then the answer is there isn't a way to do that. If you want a page to be setup the same as an existing page, but with it's own data, you need to create the page and add the features to it that you want on it. If you want a page to use features that are on another page, with the same data, you can take a look at the Global Content setting.

HTH,
Joe D.

3/2/2012 8:32:47 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

Thanks again for the information - I really just want to take something like the contact form, and change items on the form and be able to plug it back in like the initial examples with user controls... doesn't look like this would be an easy process though... 

3/2/2012 8:50:35 AM
Gravatar
Total Posts 18439

Re: Contact Form Modification

Cloning a feature is an advanced thing that requires an experienced developer who fully understands the existing code and what needs to be changed and why.

Depending on what exactly your needs are, you might find that my add on product Form Wizard Pro would meet your needs and be easier than doing custom development. You can try it out on our demo site to see if it meets your needs.

Hope that helps,

Joe

3/2/2012 10:12:44 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

Thanks again for your prompt responses and information.  :)

The goal I am working on is to integrate all existing functionality of an existing web site, into a new CMS web site, based on mojoPortal.  (Otherwise they will have to continue to run in parallel, linking back and forth between them.)

As there are a number of content items that are a bit unique and not necessarily provided for in the standard set of functionality available through mojoPortal (such as displaying data from a database query, multiple map point locations on one map, or storing form submissions into a different database), I am trying to work through the basics of getting things set up that would allow me to begin exploring any potential custom mojoPortal extensions.

While the Form Wizard Pro looks like a great product, I am sure to encounter items from the existing site that cannot be addressed or replicated through this product as they are not forms.

3/2/2012 10:58:07 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

If possible, I would really appreciate any assistance that might be provided in working through the Cloning an Existing Feature... https://www.mojoportal.com/cloning-an-existing-feature.aspx

I believe that I have started out ok, but once I get to "Change the namespace and review the code for any links where the path needs to be modified to reflect your custom folder."  I'm not entirely certain what files need to be changed... I changed the name of the namespace within ContactFormConfiguration.cs, ContactForm.ascx.cs, MessageListDialog.aspx.cs from mojoPortal.Web.ContactUI to mojoPortal.Web.ContactUI_alt1, then appended the "_alt1" to the Inherits items on MessageListDialog.aspx and ContactForm.ascx.

Then, when I get to the next step, "Copy the BlogResoures.*.resx files from mojPortal.Features.UI/App_GlobalResources to the App_GlobalResources folder in your wbe project..."  - the web project does not contain any such "App_GlobalResources", is this just a new folder that should be added?

Thanks again for your assistance.

3/2/2012 11:49:14 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

If you have time, could you provide a bit more information on the GUID process?

"You can generate a new guid using MS SQL like SELECT newid(), or in .NET code using Guid.NewGuid().ToString()"

Can this be any GUID generated from anywhere?

3/2/2012 11:51:14 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

This is what I have worked through thus far...

"I would copy one of the mojoportal.sln files and rename it, then you can add your  custom projects to this solution. Create a Web Application Project for the UI, a  Class library for the business logic and a class library for the data layer."

copied C:\mojoPortalCode\mojoportal.sln to C:\mojoPortalCode\mojoportal-alt1.sln

opened C:\mojoPortalCode\mojoportal-alt1.sln with vs 2010

created new web application (WebApplication1)

right click on solution at top of Solution Explorer list, then select "Add",           then select "New Project",           then selected Visual C# / Web / ASP.NET Web Application (.NET Framework 4)           Name:  WebApplication1           Location:  C:\mojoPortalCode

created new C# class library for business logic (ClassLibrary1_businessLogic)

right click on solution at top of Solution Explorer list,           then select "Add",           then select "New Project",           then selected Visual C# / Class Library (.NET Framework 4)           Name:  ClassLibrary1_businessLogic           Location:  C:\mojoPortalCode

created new C# class libary for the data layer (ClassLibrary2_dataLayer)

right click on solution at top of Solution Explorer list,           then select "Add",           then select "New Project",           then selected Visual C# / Class Library (.NET Framework 4)           Name:  ClassLibrary2_dataLayer           Location:  C:\mojoPortalCode

"Copy the Blog folder from the mojoPortal.Features.UI project up beneath your     web UI project and then rename the folder, then include it in your project.     ??? Change the namespace and review the code for any links where the path needs to be     modified to reflect your custom folder."

copied C:\mojoPortalCode\mojoPortal.Features.UI\ContactForm to C:\mojoPortalCode\WebApplication1\ContactForm_alt1

included files in the project

opened Windows Explorer and navigated to C:\mojoPortalCode\WebApplication1,      then, while holding down the right mouse button, dragged the directory      ContactForm_alt1 over to the WebApplication1 item within Visual Studio 2010 "Solution Explorer"

(see http://stackoverflow.com/questions/57776/how-to-add-existing-item-an-entire-directory-structure-in-visual-studio)

then, right clicked on References, and added a number of references, including:           ClassLibrary1_businessLogic           ClassLibrary2_dataLayer           mojoPortal.Business           mojoPortal.Business.WebHelpers           mojoPortal.Data.MSSQL           mojoPortal.Features.Business           mojoPortal.Features.Data.MSSQL           mojoPortal.Features.UI           mojoPortal.Net           mojoPortal.Web           mojoPortal.Web.Controls           mojoPortal.Web.Editor           mojoPortal.Web.Framework

"Copy the BlogResoures.*.resx files from mojPortal.Features.UI/App_GlobalResources to the App_GlobalResources folder in your wbe project, then rename them to somecustomname.*.resx. You don't need to copy the .designer.cs files. After you rename the .resx files include them in your project and VS will autmatically create the .designer.cs files."

right clicked on App_GlobalResources in mojoPortal.Features.UI within Visual Studio 2010, and selected "Copy"      then, right clicked on the WebApplication1 project within Visual Studio 2010 and selected "paste"      to copy all of the resources over into the new web application project

deleted all but the ContactFormResources.*.resx files, including the designer files

appended "alt1" to the beginning of all remaining ContactFormResources.*.resx files, which then automatically      generated the related designer files

"Create a folder in your Web prject named Setup, then a folder beneath it names applications."

right clicked on the WebApplication1 project within Visual Studio 2010 and selected "Add...", then "New Folder",      creating the new "Setup" folder, then      right clicked on the "Setup" folder and selected "Add...", then "New Folder",      creating the new "Applications" folder

"Copy the mojoPortal.Features.UI/Setup/applications/blog folder and put it beneath your applications folder and rename it."

copied C:\mojoPortalCode\mojoPortal.Features.UI\Setup\applications\contactform directory over to      C:\mojoPortalCode\WebApplication1\Setup\Applications and renamed it to contactform_alt1

"Look in the FeatureDefinitions folder beneath that folder and rename the file 2000_BlogModule.config to somecustomname.config."

within C:\mojoPortalCode\WebApplication1\Setup\Applications\contactform_alt1\FeatureDefinitions,      renamed 30000_ContactFormModule.config to alt130000_ContactFormModule.config

3/5/2012 10:21:19 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Contact Form Modification

To easily get a new GUID, you can use an online generator site.

I'm not sure how to help you beyond that because your questions are extremely broad. From your last post it sounds like you want someone here to walk you through the entire custom feature development process, and that's just not realistic. The best we can offer is the mojoPortal developer documentation. If you need step-by-step assistance with development, you may have to hire a .NET development consultant.

Jamie

3/5/2012 10:31:04 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

Thanks for your response - I did find an alternate online GUID generator site and used that to generate one for that particular step.

I have to disagree that these are "extremely broad" questions however.  These are specific questions about specific steps of the process in extending this specific application:  mojoPortal.  Many of the changes required are specific to getting an extension working in mojoPortal, not necessarily .net programming in general.  I am attempting to follow through these steps to replicate an existing extension within this particular application and I am trying to find information that might not only assist me in working through a step along the way, but might also help others in documenting what I did along the way to try to get something working.

3/5/2012 10:57:10 AM
Gravatar
Total Posts 18439

Re: Contact Form Modification

Hi,

The bottom line is that cloning an existing feature requires fully understanding the existing code for that feature which requires significant experience as a .NET developer. The article Cloning an Existing Feature is aimed at an audience that already has the required experience and that can read and fully understand the existing feature code. The main reason I wrote that article is to convey to people that they should not modify or fork the mojoPortal code as that will make it impossible for them to upgrade without losing their changes. 

A contact form is something relatively easy to develop from scratch for most experienced developers, one could borrow just parts of the code (like the snippet that sends email) from the contact form or clone it fully but we simply don't have the capacity to help people step by step with custom development beyond the tutorials and documentation we provide, and our tutorials and documentation are generally sufficent for someone with the requisite background. For a qualified developer the source code is the best and most complete documentation available and we've shared it, but trying to help those who do not have the required background is just too much work and too time consuming to do for free.

Best Regards,

Joe

3/5/2012 11:54:36 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

I would like to utilize this forum to collaborate with other users of mojoPortal in regard to replicating an existing feature for potential modification and discuss the steps and experience in attempting to get something functional up and running.  As time permits, if there is anything that you would like to contribute to some questions on getting this setup, that would be greatly appreciated.  Thanks again! : )

3/6/2012 8:34:13 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

I happened to come across a posting that described this process very well...

http://techblog.strongeye.com/archive/2009/12/16/creating-a-mojoportal-module.aspx

This really helped to fill in some of the information that enabled me to get a functional basis in which to start working with this a bit more.

3/6/2012 9:15:35 AM
Gravatar
Total Posts 18439

Re: Contact Form Modification

That is a good article about developing custom features from scratch. There is more in depth coverage in our video tutorial series Building a Guest Book.

It is definitely a good idea to have an understanding of how to build custom features from scratch before trying to clone an existing feature.

Thanks again for the beers!

Best,

Joe

3/6/2012 9:28:16 AM
Gravatar
Total Posts 104

Re: Contact Form Modification

Sure! :)  I will definitely check out the video tutorial series as well!

3/7/2012 11:20:28 AM
Gravatar
Total Posts 42

Re: Contact Form Modification

Without reading the entire thread, why not just roll a Form Wizard Pro form and custom form submission handler?

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