Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Form submit button PITA!
Old 08-22-2007, 03:46 AM Form submit button PITA!
Experienced Talker

Posts: 44
Name: Snapper
Location: Indiana
Trades: 0
Does anyone know how to remove it from the email results page after the form is submitted. Not a major issue, just very annoying because it serves no purpose there. Thanx in advance.
__________________
Snapper
snapcridge is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-23-2007, 04:40 AM Re: Form submit button PITA!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
dunno, well I do, but it all depends on what the "email results page" is
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-23-2007, 01:08 PM Re: Form submit button PITA!
Experienced Talker

Posts: 44
Name: Snapper
Location: Indiana
Trades: 0
Maybe there's another name for it, lol! It's the page that I get emailed to me that shows the results of the submitted form.
__________________
Snapper
snapcridge is offline
Reply With Quote
View Public Profile
 
Old 08-23-2007, 01:51 PM Re: Form submit button PITA!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
right, so it's the HTML page that appears in your inbox after some action on your website.

simplest way is to not send it

Quite how you would do that for your situation I have no idea.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-23-2007, 02:09 PM Re: Form submit button PITA!
Experienced Talker

Posts: 44
Name: Snapper
Location: Indiana
Trades: 0
Okay maybe I should clarify. This a form that's on a web page. When the form is filled out and submitted it's sent to a php file and the results come to the inbox. It's not the actual button that's sent. It's the value for submit that shows up. ex below

First Name: John
Last Name: Doe
Email: johndoe@removethesubmitvalue.com
Phone: (123) 456-7890
Interest: To get this issue fixed
Submit: Send it {This is the element I want to remove!

Anyone know how to do it.
__________________
Snapper
snapcridge is offline
Reply With Quote
View Public Profile
 
Old 08-23-2007, 02:32 PM Re: Form submit button PITA!
Ultra Talker

Posts: 483
Trades: 0
Is it too much to ask you for some code? How do you expect us to tell you what to do when you essentially haven't told us what you did in the first place?

Show us the code and you'll probably have a reply in an hour or two. It's most likely VERY simple.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 08-24-2007, 02:34 AM Re: Form submit button PITA!
D-not's Avatar
Extreme Talker

Posts: 222
Name: Bryan
Location: British Columbia, Canada
Trades: 0
Give submit a variable and clear it's value at the end? I've never tried E-mailing myself an html form page, usually settle for the variables.
__________________
Found in Engine files:
Code:
// it's amazing what people will comment out
4966 796F75 63616E 72656164 74686973. 796F75 617265 61 6765656B.
D-not is offline
Reply With Quote
View Public Profile
 
Old 08-27-2007, 07:41 PM Okay I give...
Experienced Talker

Posts: 44
Name: Snapper
Location: Indiana
Trades: 0
Here's the code:
<form method="post" name="contactform" onsubmit="return CheckRequiredFields() "class="cmxform" action="/contact/contact-submit.php">
<input type="hidden" name="recipient" value="yzprnwz2yzprnwaszppwvhrtns*xmo" />
<input type="hidden" name="subject" value="Consult/General Info Request Form" />
<input type="hidden" name="redirect" value="http://balindahalldesigns.websnapdesign.com/contact/thankyou.html" />
<input type="hidden" name="required" value="firstname,lastname,email" />
<input type="hidden" name="sort" value="order:firstname,lastname,email,phone" />
<input type="hidden" name="alias" value="firstname=First Name,lastname= Last Name,email=Email,contact_phone=Phone#,cust_type=In terested in,message=Message" />
<input type="hidden" name="alias_method" value="email" />
<fieldset>
<legend>Consultation/General Info Request</legend>
<ol>
<li>
<label for="firstname">First Name&nbsp;<span>(required)</span></label>
<input name="firstname" type="text" />
</li>

<li>
<label for="lastname">Last Name&nbsp;<span>(required)</span></label>
<input name="lastname" type="text" />
</li>
<li>
<label for="email">Email&nbsp;<span>(required)</span></label>
<input name="email" type="text" />
</li>
<li>
<label for="contact_phone">Phone&nbsp;</label>
<input name="contact_phone" type="text" />
</li>
<li>
<label for="cust_type">What are you interested in?</label>
<select name="cust_type">
<option value="" selected="selected">Choose one...</option>
<option value="Residential Design">Residential Design</option>
<option value="Aging-In-Place">Aging-In-Place</option>
<option value="Commercial Design">Commercial Design</option>
<option value="Event Planning">Event Planning</option>
<option value="Other">Other (please explain below)</option>
</select>
</li>
<li>
<label for="message">Any other details?</label>
<textarea name="message" rows="5" cols="30"></textarea>
</li>
<li>
<input type="submit" name="submit" class="button" value="send it" />my issue is with this. I just don't want this to show up in the email results when I get them in my inbox.
</li>
</ol>
</fieldset>
</form>
__________________
Snapper
snapcridge is offline
Reply With Quote
View Public Profile
 
Old 08-27-2007, 10:56 PM Re: Form submit button PITA!
Ultra Talker

Posts: 483
Trades: 0
Hmmm... getting closer, but we actually need to see the PHP code that is sending the email itself.

That is to say... the PHP code in /contact/contact-submit.php.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 08-27-2007, 11:29 PM Re: Form submit button PITA!
Experienced Talker

Posts: 44
Name: Snapper
Location: Indiana
Trades: 0
function send_mail()
{
global $form, $invis_array, $valid_env, $fieldname_lookup, $errors;

$email_replace_array = "\r|\n|to:|cc:|bcc:";

if (!isset($form['subject']))
$form['subject'] = 'WWW Form Submission';
if (isset($form['subject_prefix']))
$form['subject'] = $form['subject_prefix'] . $form['subject'];
if (!isset($form['email']))
$form['email'] = 'email@example.com';

switch ($form['mail_newline']) {
case 2: $mail_newline = "\r";
break;
case 3: $mail_newline = "\r\n";
break;
default: $mail_newline = "\n";
}

if (isset($form['gmt_offset']) && ereg('^(\\-|\\+)?([0-9]{1}|(1{1}[0-2]{1}))$', $form['gmt_offset'])) {
$mkseconds = mktime(gmdate('H') + $form['gmt_offset']);
$mail_date = gmdate('F jS, Y', $mkseconds) . ' at ' . gmdate('h:iA', $mkseconds) . ' (GMT ' . $form['gmt_offset'] . ').';
} else
$mail_date = date('F jS, Y') . ' at ' . date('h:iA (T).');

if (isset($form['realname']))
$realname = eregi_replace($email_replace_array,'',$form['realname']);
elseif (isset($form['firstname']) || isset($form['lastname']))
$realname = eregi_replace($email_replace_array,'',trim($form['firstname'] . ' ' . $form['lastname']));

$mailbody = 'Below is the result of your Contact/General Info Request form. It was submitted by' . $mail_newline;
if (isset($realname))
$mailbody.= $realname . ' (' . $form['email'] . ') on ' . $mail_date . $mail_newline . $mail_newline;
else
$mailbody.= $form['email'] . ' on ' . $mail_date . $mail_newline . $mail_newline;

reset($form);

while (list($key,$val) = each($form)) {
if ((!in_array($key,$invis_array)) && ((isset($form['print_blank_fields'])) || ($val))) {
if(($form['alias_method'] == 'email') || ($form['alias_method'] == 'both'))
$mailbody .= $fieldname_lookup[$key];
else
$mailbody .= $key;
$mailbody .= ': ' . $val . $mail_newline;
}
}

if (isset($form['env_report'])) {
$temp_env_report = explode(',', $form['env_report']);
$mailbody .= $mail_newline . $mail_newline . '-------- Env Report --------' . $mail_newline;
while (list(,$val) = each($temp_env_report)) {
if (in_array($val,$valid_env))
$mailbody .= eregi_replace($email_replace_array,'',$val) . ': ' . eregi_replace($email_replace_array,'',getenv($val) ) . $mail_newline;
}
}

if (!isset($form['recipient']))
$form['recipient'] = '';
__________________
Snapper
snapcridge is offline
Reply With Quote
View Public Profile
 
Old 08-27-2007, 11:40 PM Re: Form submit button PITA!
Ultra Talker

Posts: 483
Trades: 0
Not guaranteed (as I'm getting quite sleepy) but as a hacky fix I wouldn't be surprised if after:
global $form, $invis_array, $valid_env, $fieldname_lookup, $errors;

adding the line:
$invis_array[] = 'submit';

would fix it.
__________________

Please login or register to view this content. Registration is FREE
TwistMyArm is offline
Reply With Quote
View Public Profile
 
Old 08-27-2007, 11:50 PM Re: Form submit button PITA!
Experienced Talker

Posts: 44
Name: Snapper
Location: Indiana
Trades: 0
Quote:
Originally Posted by TwistMyArm View Post
Not guaranteed (as I'm getting quite sleepy) but as a hacky fix I wouldn't be surprised if after:
global $form, $invis_array, $valid_env, $fieldname_lookup, $errors;

adding the line:
$invis_array[] = 'submit';

would fix it.
Learn something new every minute; that fixed it. Thanxamillion! Wasn't a life/death situation, but one of those annoyances that well...annoyed me! Thanks again for the help.
__________________
Snapper
snapcridge is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Form submit button PITA!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.38615 seconds with 12 queries