Help with User Control for Contact Form Submission
I am very very new to asp.net, and I am trying to amend the layout of an email when a user submits a contact form. We have a user control in place that outputs each field in it's own row:
Hi Alex, We are using Umbraco 4 - I know it's old - but we inherited the website a few years ago for hosting and maintenance and now my client needs some changes making to the email they receive on form submission.
Hi David, Thanks so much for the pointers - just to check, could this also be ef.AddRow("Title", string.Concat(DdlTitle, "First Name", TbFirstName, "Last name", TbLastName));
I don't know TBH. I'm guessing the first argument should be a label and the second is the actual value. I've edited my previous post to put "Name" as the first property.
A line like string.Concat(DdlTitle.SelectedValue, " ", TbFirstName.Text, " ", TbLastName.Text) will create a single string and so shouldn't be separated by lines. You're sure it is this code that is generating the 3 lines?
Help with User Control for Contact Form Submission
I am very very new to asp.net, and I am trying to amend the layout of an email when a user submits a contact form. We have a user control in place that outputs each field in it's own row:
ef.AddHeading("Contact Details"); ef.AddRow("Title", DdlTitle); ef.AddRow("First Name", TbFirstName); ef.AddRow("Last Name", TbLastName);
What I am trying to do, with much difficulty, is put the title, first name and surname in one row, rather than 3.
Please excuse my complete lack of knowledge, I am a php kinda person...
Hi Sarah
What version of Umbraco are you using?
Why did you decide to use usercontrols?
Thanks,
Alex
Hi Alex, We are using Umbraco 4 - I know it's old - but we inherited the website a few years ago for hosting and maintenance and now my client needs some changes making to the email they receive on form submission.
Pure guess with not enough information but try:
or
or
or versions there of
Hi David, Thanks so much for the pointers - just to check, could this also be ef.AddRow("Title", string.Concat(DdlTitle, "First Name", TbFirstName, "Last name", TbLastName));
I don't know TBH. I'm guessing the first argument should be a label and the second is the actual value. I've edited my previous post to put "Name" as the first property.
The suggestion doesn't seem to have worked - there is no error on the form, but the name still display over 3 lines...I'm baffled! Any other ideas?
A line like
string.Concat(DdlTitle.SelectedValue, " ", TbFirstName.Text, " ", TbLastName.Text)
will create a single string and so shouldn't be separated by lines. You're sure it is this code that is generating the 3 lines?I think so - this is what I have at the moment in the ascx.cs:
EmailFormatter ef = new EmailFormatter(true);
is working on a reply...