close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Editing Center.php

Thread began 8/11/2010 2:59 am by rmruda390861 | Last modified 8/12/2010 10:41 am by Jason Byrnes | 543 views | 3 replies |

rmruda390861

Editing Center.php

My form is working fine. Email arrives fine as expected.
I used your "Create a file for your email" webassit/email/template/Center.php.
I am at a loss as to how to edit this form.
There are no Sever Behavous or Bindings.
I need to be able to edit the actual field names printed on the form, for example "Contact Me group First Name:" to make them more presentable.
I am able to go back into univesal email via Server behavious and create new forms from your templates and of course can edit the basic layout but not the "php"
Thanks
Richard

Sign in to reply to this post

Jason ByrnesWebAssist

the center php page uses a loop to go through each form field that is posted and write its value, the label uses the form elements name, you edit the code that writes the form label to change "Contact Me group First Name" to be just "First Name"


The code in the center.php page to write the label will look like:

php:
<th style="font-size: 10px;font-family: Arial, Helvetica, sans-serif;width: 134px; text-align: right; padding: 3px 10px 3px 3px; color: #FE6C00; font-weight: bold;"><?php echo(str_replace("_"," ",$pkey)); ?>:</th>



you can change it to:

php:
<th style="font-size: 10px;font-family: Arial, Helvetica, sans-serif;width: 134px; text-align: right; padding: 3px 10px 3px 3px; color: #FE6C00; font-weight: bold;"><?php echo(str_replace("_"," ",str_replace("Contact_Me_group_"""$pkey))); ?>:</th>




This will strip the "Contact_Me_group_" string from the form elements name leaving only "First name"

Sign in to reply to this post

rmruda390861

Thanks Jason - worked OK.
Is there anyway to limit the fields displayed with the template...
For example to remove the Hidden fields and the submit button. Sure I can do this with a custom form but what about the built in templates?
Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

neear the top of the page, there is the following code:

php:
$remove = array();

$remove[]  = "";
$remove[]  = "x";
$remove[]  = "y";



this is an array of form elements that will be removed from the email. add the name of any form element that should not be incused in the email to the array. for example, if you have a hidden form element named "My_Hidden_Form_Element" that you dont want to show in the email, add a new node to the array:

php:
$remove = array();

$remove[]  = "";
$remove[]  = "x";
$remove[]  = "y";
$remove[]  = "My_Hidden_Form_Element";
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...