Need help with a form where checkbox displays another field

I created a from in january that works perfectly.  I have different departments as checkboxes and if the box is checked, it displays another subform with a comments, approval, and signature field.  However, we just added two new departments.  I copied one of the checkboxes and subsequent fields twice.  I then changed the script for the approriate field and checked to make sure there were no other functions I was missing.  However, now when I open the form, the two new fields show by default.  If I check the box and uncheck, the associated subform disappears.  I think there may be some simple thing i am overlooking. 

I'm not getting any errors at all. The form isn't online as of yet so I dont have a link. I will attach a screen shot and maybe you can tell me where I went wrong.

Similar Messages

  • Need help with PHP form with checkboxes, radio buttons and file attachment

    Hi guys,
    I'm having a nightmare with this PHP form where a user can fill it in, attach a doc/pdf and submit. After trying to sort it out with previous code I've used, I've stripped it out and think I should just start again in the hope you geniuses can help!
    Here is the HTML of contact.php:
    <form action="" method="post" name="contact" id="contact">
        <p>Job Title:*<br />
        <input name="position" type="text" /></p>
        <p>Nationality:*<br />
        <select name="nationality">
          <option value="">-- select one --</option>
          <option value="Afghan">Afghan</option>
          <option value="Albanian">Albanian</option>
          <option value="Algerian">Algerian</option>
          <option value="Zambian">Zambian</option>
          <option value="Zimbabwean">Zimbabwean</option>
        </select>
        </p>
        <p>Which country are you currently living in?*<br />
        <select name="country">
        <option value="">-- select one --</option>
        <option value="United Kingdom">United Kingdom</option>
        <option value="Afghanistan">Afghanistan</option>
        <option value="Africa">Africa</option>
        <option value="Zambia">Zambia</option>
        <option value="Zimbabwe">Zimbabwe</option>
        </select>
        </p>
        <label class="radio" for="checkRight">Yes/No question?</label><br />
        <input class="radio" type="radio" name="right" value="Yes" /> Yes
        <input class="radio" type="radio" name="right" value="No" /> No
        <input class="radio" type="radio" name="right" value="N/A" /> Not applicable
        <p>Yes/No question?<br />
        <select name="continue">
        <option value="">-- select one --</option>
        <option value="Yes">Yes</option>
        <option value="No">No</option>
        </select>
        </p>
        <p>Select your resorts:<br />
        Resort 1<input name="res1" type="checkbox" value="Resort 1" />
        Resort 2<input name="res2" type="checkbox" value="Resort 2" />
        Resort 3<input name="res3" type="checkbox" value="Resort 3" />
        Resort 4<input name="res4" type="checkbox" value="Resort 4" />
        Resort 5<input name="res5" type="checkbox" value="Resort 5" />
        Resort 6<input name="res6" type="checkbox" value="Resort 6" />   
        </p>
        <p>Don't send form unless this is checked:* <input type="checkbox" name="parttime" value="Yes" /></p>
        <p>Date of arrival: <input name="arrive" id="datepick" /><br />
        Date of departure: <input name="depart" id="datepick2" /></p>
        <script type="text/javascript" src="assets/scripts/datepickr/datepickr.js"></script>
        <link href="assets/scripts/datepickr/datepickr.css" rel="stylesheet">
        <script type="text/javascript">
        new datepickr('datepick');
        new datepickr('datepick2', {
        </script>
        <p>Name:*<br />
        <input name="name" type="text" /></p>
        <p>E-mail:*<br />
        <input name="email" type="text" /></p>
        <p>Telephone:*<br />
        <input name="telephone" type="text" class="ctextField" /></p>
        <p>Upload CV (Word of PDF formats only):<br />
        <input type="file" name="cv" class="textfield"></p>
        <p><input name="submit" value="Submit Enquiry" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    By the way, the date boxes work so excuse the Javascript in there!
    To prevent SPAM I've used a trick where there's a hidden URL field which must be left blank for the form to submit which you can see in the PHP.
    Below is where I'm at with the PHP which is placed above the header of contact.php...
    <?php
    if (array_key_exists('submit', $_POST)) {
        $position = $_POST['position'];
        $arrive = $_POST['arrive'];
        $nationality = $_POST['nationality'];
        $parttime = $_POST['parttime'];
        $depart = $_POST['depart'];
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
    $to = "[email protected]";
    $subject = "Recruitment Application";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= 'From: My Website <[email protected]>' . "\r\n";
    $message= "
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mywebsite.co.uk/sent.php' );
    ?>
    I would like to make pretty much all the field compulsory so if a field is left empty (other than the hidden URL field), a warning message is displayed next to that field.
    Also I would like the file upload field to attach to the email that is sent to me and have the results come through to me in a table format.
    Can anyone help me get my form working?
    Thank you and I hope to hear from you!
    SM

    Hi Nancy,
    Great stuff, thank you for the reply.
    I've managed to get the Formm@iler working and running as I need it to.
    The only thing I'm struggling with is when the user clicks submit, they are taken to a page of whatever results the form returned but it is just a white background with Times New Roman text.
    How can I have it so the user is taken to the form results in the websites' page layout?
    I tried sending them to a generic 'thank you' page by adding the following code but it just took them there whatever the results of the form so that's no good...! I have a feeling it's a bit more complicated than that...
    header( 'Location: http://www.nofussbus.co.uk/test/sent.php' );
    Thank you for your help!

  • Need Help with Conatct Form

    I created a Contact Form  in DW CS6, and I used the php and html files provided by Nancy O. in her forum dated back to October 2011. Follow the link for details. http://forums.adobe.com/message/3970070#3970070
    I believe I have followed all the required steps, and almost everything seems working properly, except that I am not (Recipient) getting an e-mail. However, the client has received an automated reply from me (Recipient). But no e-mail were sent to me.
    Please refer to below (Part of php code - Between Lines 12 and 35) where I have made the changes:
    I am not sure where I have made an error(s). Could anyone please assist?

    Hi Nancy,
    I created a new Gmail address as you suggested, and then tested the Form with it. I still can't receive an e-mail.
    Also, I have contacted my Web Host, and they confirmed that there are no issues from their end.
    I have attached below both the php and the html files, and I would appreciate if you can take a look at them for correctness:
    PHP File:
    <?php
    // Form Processing Script
    // General Variables
        $check_referrer="no";
        $referring_domains="http://domain.com/,http://www.domain.com/,http://subdomain.domain.com/";
    // options to use if hidden field "config" has a value of 0
    // recipient info
        $charset[0]="iso-8859-1";
        $tomail[0]="[email protected]";
        $cc_tomail[0]=" ";
        $bcc_tomail[0]="";
    // Mail contents config
        $subject[0]="message from EMCG.COM";
        $reply_to_field[0]="email";
        $reply_to_name[0]="email";
        $required_fields[0]="first_name,last_name";
        $required_email_fields[0]="email";
        $attachment_fields[0]="";
        $return_ip[0]="yes";
        $mail_intro[0]="The following message was sent from EMCG.COM:";
        $mail_fields[0]="first_name,last_name,email,phone,subject,message";
        $mail_type[0]="text";
        $mail_priority[0]="1";
        $allow_html[0]="no";
    // Send back to sender config
        $send_copy[0]="yes";
        $copy_format[0]="vert_table";
        $copy_fields[0]="first_name,last_name,subject,message";
        $copy_attachment_fields[0]="";
        $copy_subject[0]="EMCG automated reply";
        $copy_intro[0]="Thanks for taking time to contact EMCG. Someone will be in touch with you soon.";
        $copy_from[0]="[email protected]";
        $copy_tomail_field[0]="email";
    // Result options
        $header[0]="";
        $footer[0]="";
        $error_page[0]="";
        $thanks_page[0]="";
    // Default Error and Success Page Variables
        $error_page_title[0]="Error - Missing Fields";
        $error_page_text[0]="Required information is missing. Please use your browser's back button to return to the form and complete the required fields.";
        $thanks_page_title[0]="Success - Form processing completed";
        $thanks_page_text[0]="Thank you. Please check your e-mail for an automated confirmation. ";
    // Antispam Options
        $empty_field[0]="nospam";
        $character_scan[0]="message";
        $time_delay[0]="";
        $captcha_codes[0]="9C2449,EEADC8,77A585,D72838";
        $max_urls[0]="1";
        $max_url_fields[0]="message";
        $flag_spam[0]="";
    // Don't muck around past this line unless you know what you are doing //
    ob_start();
    $config=$_POST["config"];
    $debug=0;
    $debug_text="";
    // fix for Windows email server security
    ini_set("sendmail_from",$tomail[$config]);
    // email validation regular expression
    $regex = "^[-a-z0-9!#$%&\'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+/=?^_`{|}~]+)*@(([a-z0-9]([-a-z0-9]*[a -z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$";
    $header_injection_regex = "(\r|\n)";
    if($header[$config]!="")
        include($header[$config]);
    if($_POST["submit"] || $_POST["Submit"] || $_POST["submit_x"] || $_POST["Submit_x"])
    // begin global functions //
    // get visitor IP
        function getIP()
            if(getenv(HTTP_X_FORWARDED_FOR))
                $user_ip=getenv("HTTP_X_FORWARDED_FOR");
            else
                $user_ip=getenv("REMOTE_ADDR");
            return $user_ip;
    // get value of given key
        function parseArray($key)
            $array_value=$_POST[$key];
            $count=1;
            extract($array_value);
            foreach($array_value as $part_value)
                if($count > 1){$value.=", ";}
                $value.=$part_value;
                $count=$count+1;
            return $value;
    // stripslashes and autolink url's
        function parseValue($value)
            $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
            return $value;
    // html header if used
        function htmlHeader()
            $htmlHeader="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$charset[$config]."\"></head>\n<body>\n<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\">\n";
            return $htmlHeader;
    // html footer if used
        function htmlFooter()
            $htmlFooter="</table>\n</body>\n</html>\n";
            return $htmlFooter;
    // build verticle table format
        function buildVertTable($fields, $intro, $to, $send_ip)
            $message=htmlHeader();
            if($intro != "")
                $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"2\">".$intro."</td>\n</tr>\n";
            $fields_check=preg_split('/,/',$fields);
            $run=sizeof($fields_check);
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $cur_value=$_POST[$cur_key];
                if(is_array($cur_value))
                    $cur_value=parseArray($cur_key);
                $cur_value=parseValue($cur_value);
                if($allow_html[$config]=="no")
                    $cur_value=htmlspecialchars(nl2br($cur_value));
                else
                    $cur_value=nl2br($cur_value);
                $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$cur_value."</td>\n</tr>\n";
            if($send_ip=="yes" && $to=="recipient")
                $user_ip=getIP();
                $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$user_ip."</td>\n</tr>\n";
            $message.=htmlFooter();
            return $message;
    // build horizontal table format
        function buildHorzTable($fields, $intro, $to, $send_ip)
            $message=htmlHeader();
            $fields_check=preg_split('/,/',$fields);
            $run=sizeof($fields_check);
            if($intro != "")
                $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"".$run."\">".$intro."</td>\n</tr>\n";
            $message.="<tr>\n";
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n";
            if($send_ip=="yes" && $to=="recipient")
                $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n";
            $message.="</tr>\n";
            $message.="<tr>\n";
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $cur_value=$_POST[$cur_key];
                if(is_array($cur_value))
                    $cur_value=parseArray($cur_key);
                $cur_value=parseValue($cur_value);
                if($allow_html[$config]=="no")
                    $cur_value=htmlspecialchars(nl2br($cur_value));
                else
                    $cur_value=nl2br($cur_value);
                $message.="<td align=\"left\" valign=\"top\">".$cur_value."</td>\n";
            $message.="</tr>\n";
            $message.="<tr>\n";
            if($send_ip=="yes" && $to=="recipient")
                $user_ip=getIP();
                $message.="<td align=\"left\" valign=\"top\">".$user_ip."</td>\n";
            $message.="</tr>\n";
            $message.=htmlFooter();
            return $message;
    // build plain text format
        function buildTextTable($fields, $intro, $to, $send_ip)
            $message="";
            if($intro != "")
                $message.=$intro."\n\n";
            $fields_check=preg_split('/,/',$fields);
            $run=sizeof($fields_check);
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $cur_value=$_POST[$cur_key];
                if(is_array($cur_value))
                    $cur_value=parseArray($cur_key);
                $cur_value=parseValue($cur_value);
                if($allow_html[$config]=="no")
                    $cur_value=htmlspecialchars($cur_value);
                else
                    $cur_value=$cur_value;
                $message.="".$cur_key.": ".$cur_value."\n";
            if($send_ip=="yes" && $to=="recipient")
                $user_ip=getIP();
                $message.="Sender IP: ".$user_ip."\n";
            return $message;
    // get the proper build fonction
        function buildTable($format, $fields, $intro, $to, $send_ip)
            if($format=="vert_table")
                $message=buildVertTable($fields, $intro, $to, $send_ip);
            else if($format=="horz_table")
                $message=buildHorzTable($fields, $intro, $to, $send_ip);
            else
                $message=buildTextTable($fields, $intro, $to, $send_ip);
            return $message;
    // referrer checking security option
        function checkReferer()
            if($check_referrer=="yes")
                $ref_check=preg_split('/,/',$referring_domains);
                $ref_run=sizeof($ref_check);
                $referer=$_SERVER['HTTP_REFERER'];
                $domain_chk="no";
                for($i=0;$i<$ref_run;$i++)
                    $cur_domain=$ref_check[$i];
                    if(stristr($referer,$cur_domain)){$domain_chk="yes";}
            else
                $domain_chk="yes";
            return $domain_chk;
    // checking required fields and email fields
        function checkFields($text_fields, $email_fields, $regex)
              $error_message="";
            if($debug==1)
                $error_message.="<li>text_fields: ".$text_fields."<br />email_fields: ".$email_fields."<br />reply_to_field: ".$reply_to_field."<br />reply_to_name: ".reply_to_name."</li>";
            if($text_fields != "")
                $req_check=preg_split('/,/',$text_fields);
                $req_run=sizeof($req_check);
                for($i=0;$i<$req_run;$i++)
                    $cur_field_name=$req_check[$i];
                    $cur_field=$_POST[$cur_field_name];
                    if($cur_field=="")
                        $error_message.="<li>You are missing the <b>".$req_check[$i]."</b> field</li>\n";
            if($email_fields != "")
                $email_check=preg_split('/,/',$email_fields);
                $email_run=sizeof($email_check);
                for($i=0;$i<$email_run;$i++)
                    $cur_email_name=$email_check[$i];
                    $cur_email=$_POST[$cur_email_name];
                    if($cur_email=="" || !eregi($regex, $cur_email))
                        $error_message.="<li>You are missing the <b>".$email_check[$i]."</b> field or it is not a valid email address.</li>\n";
            return $error_message;
    // attachment function
        function getAttachments($attachment_fields, $message, $content_type, $border)
            $att_message="This is a multi-part message in MIME format.\r\n";
            $att_message.="--{$border}\r\n";
            $att_message.=$content_type."\r\n";
            $att_message.="Content-Transfer-Encoding: 7bit\r\n\r\n";
            $att_message.=$message."\r\n\r\n";
            $att_check=preg_split('/,/',$attachment_fields);
            $att_run=sizeof($att_check);
            for($i=0;$i<$att_run;$i++)
                $fileatt=$_FILES[$att_check[$i]]['tmp_name'];
                $fileatt_name=$_FILES[$att_check[$i]]['name'];
                $fileatt_type=$_FILES[$att_check[$i]]['type'];
                if (is_uploaded_file($fileatt))
                    $file=fopen($fileatt,'rb');
                    $data=fread($file,filesize($fileatt));
                    fclose($file);
                    $data=chunk_split(base64_encode($data));
                    $att_message.="--{$border}\n";
                    $att_message.="Content-Type: {$fileatt_type}; name=\"{$fileatt_name}\"\r\n";
                    $att_message.="Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n";
                    $att_message.="Content-Transfer-Encoding: base64\r\n\r\n".$data."\r\n\r\n";
            $att_message.="--{$border}--\n";
            return $att_message;
    // function to set content type
        function contentType($charset, $format)
            if($format=="vert_table")
                $content_type="Content-type: text/html; charset=".$charset."\r\n";
            else if($format=="horz_table")
                $content_type="Content-type: text/html; charset=".$charset."\r\n";
            else
                $content_type="Content-type: text/plain; charset=".$charset."\r\n";
            return $content_type;
    // end global functions //
    // begin procedural scripting //
        // anti-spam empty field check
        if($_POST[$empty_field[$config]] != "")
            $empty_message = "<li>This submission failed and was flagged as spam.</li>\n";
        // anti-spam character scan check
        if(strlen($character_scan[$config]) > 0)
            $spam_message="";
            $field_check=preg_split('/,/',$character_scan[$config]);
            $field_run=sizeof($field_check);
            for($i=0;$i<$field_run;$i++)
                $cur_field_name=$field_check[$i];
                $cur_field=$_POST[$cur_field_name];
                if(preg_match("/<(.|\n)+?>/", $cur_field) || preg_match("/\[(.|\n)+?\]/", $cur_field))
                    $spam_message.="<li>This message contains disallowed characters.</li>\n";
        // anti-spam time delay check
        if((strlen($time_delay[$config]) > 0 && strlen($_POST["time"]) > 0) || (strlen($time_delay[$config]) > 0 && (strlen($_POST["time"]) == 0 || !$_POST["time"])))
            if((time() - $_POST["time"]) < $time_delay[$config])
                $time_message = "<li>This has been stopped by the timer, and is likely spam.</li>\n";
        // anti-spam CAPTCHA check
        if(strlen($captcha_codes[$config]) > 0)
            $captcha_check=preg_split('/,/',$captcha_codes[$config]);
            if(strtolower($_POST["captcha_entry"]) != strtolower($captcha_check[$_POST["captcha_code"]]))
                $captcha_message = "<li>CAPTCHA test did not match.</li>\n";
        // anti-spam max URL check
        if(strlen($max_url_fields[$config]) > 0)
            $max_url_message="";
            $field_check=preg_split('/,/',$max_url_fields[$config]);
            $field_run=sizeof($field_check);
            for($i=0;$i<$field_run;$i++)
                $cur_field_name=$field_check[$i];
                $cur_field=$_POST[$cur_field_name];
                preg_match_all("/http:/", $cur_field, $matches);
                if(count($matches[0]) > $max_urls[$config])
                    $max_url_message.="<li>This message contains too many URL's.</li>\n";
        // set anti-spam flagging option
        if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) == 0)
            $set_flag = 2;
        else if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) > 0)
            $set_flag = 1;
        else
            $set_flag = 0;
        // header injection check
           $security_filter="";
        if(strlen($_POST[$reply_to_field[$config]]) > 0)
            if(eregi($header_injection_regex,$_POST[$reply_to_field[$config]]))
                $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
            else
                $reply_to_field_checked=$_POST[$reply_to_field[$config]];
        if(strlen($_POST[$reply_to_name[$config]]) > 0)
            if(eregi($header_injection_regex,$_POST[$reply_to_name[$config]]))
                $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
            else
                $reply_to_name_checked=$_POST[$reply_to_name[$config]];
        // check domain referrer and continue
        $domain_chk=checkReferer();
        if($domain_chk=="yes")
            $error_message=checkFields($required_fields[$config], $required_email_fields[$config], $regex);
            if(strlen($error_message) < 1 && strlen($security_filter) < 1 && $set_flag < 2)
                // build appropriate message format for recipient
                $content_type=contentType($charset[$config], $mail_type[$config]);
                $message=buildTable($mail_type[$config], $mail_fields[$config], $mail_intro[$config], "recipient", $return_ip[$config]);
                // build header data for recipient message
                //$extra="From: ".$_POST[$reply_to_field[$config]]."\r\n";
                $extra="From: ".$reply_to_name_checked." <".$reply_to_field_checked.">\r\n";
                if($cc_tomail[$config]!="")
                    $extra.="Cc: ".$cc_tomail[$config]."\r\n";
                if($bcc_tomail[$config]!="")
                    $extra.="Bcc: ".$bcc_tomail[$config]."\r\n";
                if($mail_priority[$config]!="")
                    $extra.="X-Priority: ".$mail_priority[$config]."\r\n";
                // get attachments if necessary
                if($attachment_fields[$config]!="")
                    $semi_rand=md5(time());
                    $border="==Multipart_Boundary_x{$semi_rand}x";
                    $extra.="MIME-Version: 1.0\r\n";
                    $extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                    $message=getAttachments($attachment_fields[$config], $message, $content_type, $border);
                else
                    $extra.="MIME-Version: 1.0\r\n".$content_type;
                // send recipient email
                if($debug==1)
                    if($set_flag == 1)
                        $debug_text.="<p><b>Mail would have sent flagged for spam if not in debug mode.</b></p>";
                    else
                        $debug_text.="<p><b>Mail would have sent if not in debug mode.</b></p>";
                else if($debug==0)
                    if($set_flag == 1)
                        $subject = $flag_spam[$config]." ".$subject[$config];
                    else
                        $subject = $subject[$config];
                    mail("".$tomail[$config]."", "".stripslashes($subject)."", "".stripslashes($message)."", "".$extra."");
                // autoresponse email if necessary
                if($send_copy[$config]=="yes")
                    // build appropriate message format for autoresponse
                    $content_type=contentType($charset[$config], $copy_format[$config]);
                    $message=buildTable($copy_format[$config], $copy_fields[$config], $copy_intro[$config], "autoresponder", $return_ip[$config]);
                    // build header data for autoresponse
                    $copy_tomail=$_POST[$copy_tomail_field[$config]];
                    $copy_extra="From: ".$copy_from[$config]."\r\n";
                    // get autoresponse  attachments if necessary
                    if($copy_attachment_fields[$config]!="")
                        $semi_rand=md5(time());
                        $border="==Multipart_Boundary_x{$semi_rand}x";
                        $copy_extra.="MIME-Version: 1.0\r\n";
                        $copy_extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                        $message=getAttachments($copy_attachment_fields[$config], $message, $content_type, $border);
                    else
                        $copy_extra.="MIME-Version: 1.0\r\n".$content_type;
                    // send autoresponse email
                    if($debug==1)
                        if($set_flag == 1)
                            $debug_text.="<p><b>Autoresponder would have sent flagged for spam if not in debug mode.</b></p>";
                        else
                            $debug_text.="<p><b>Autoresponder would have sent if not in debug mode.</b></p>";
                    else if($debug==0)
                        $send_copy = 1;
                        if($copy_tomail=="" || !eregi($regex,$copy_tomail))
                            $send_copy = 0;
                        if($send_copy == 1)
                            if($set_flag == 1)
                                $copy_subject = $flag_spam[$config]." ".$copy_subject[$config];
                            else
                                $copy_subject = $copy_subject[$config];
                            mail("$copy_tomail", "".$copy_subject."", "$message", "$copy_extra");
                // showing thanks pages from a successful submission
                if($thanks_page[$config]=="")
                    echo "<h3>".$thanks_page_title[$config]."</h3>\n";
                    echo "<p>".$thanks_page_text[$config]."</p>\n";
                    if(strlen($debug_text) > 0)
                        echo "<p><b><i>".$debug_text."</i></b></p>\n";
                else
                    header("Location: ".$thanks_page[$config]);
            else
                // entering error page options from missing required fields
                if($error_page[$config]=="")
                    echo "<h3>".$error_page_title[$config]."</h3>\n";
                    echo "<ul>\n";
                    echo $security_filter.$empty_message.$error_message.$spam_message.$time_message.$captcha_messa ge.$max_url_message;
                    echo "</ul>\n";
                    echo "<p>".$error_page_text[$config]."</p>\n";
                else
                    header("Location: ".$error_page[$config]);
        else
            echo "<h3>".$error_page_title[$config]."</h3>\n";
            // message if unauthorized domain trigger from referer checking option
            echo "<p>Sorry, mailing request came from an unauthorized domain.</p>\n";
    // end procedural scripting //
    else
        echo "<h3>Error</h3>";
        echo "<p>No form data has been sent to the script</p>\n";
    if($footer[$config]!="")
        include($footer[$config]);
    ob_end_flush();
    ?>
    <input type="button" value="Return to Form" onClick="javascript: history.go(-1);" />
    HTML File:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Sample Form</title>
    <style type="text/css">
    /**BEGIN FORM STYLES**/
    #form1 {
    font-size: 14px;
    width: 500px;
    margin: 0 auto; /**centered**/
    background: #FFF;
    border: 2px groove green;
    padding: 7px 14px 7px 14px;
    fieldset {
    margin-bottom: 5px;
    border-right: none;
    border-bottom: none;
    border-left: none;
    legend {
    padding: 8px;
    border: 1px solid silver;
    background: #009900;
    font-weight: bold;
    color: #FFFFFF;
    margin-left: -75px;
    *margin-left:0;
    line-height: 1.5
    /**wrap form lables and fields inside ordered lists for better web accessibility**/
    #form1 ol {
    list-style: none;
    margin: 0;
    padding: 0
    #form1 li {
    padding: 5px;
    margin: 0;
    clear: left;
    label {
    display: inline-block;
    float: left;
    line-height: 23px; /**lines up labels with fields**/
    width: 167px;
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-right: 10px; /*space between labels, fields*/
    input[type=text], textarea {
    width: 190px; /**same width on text fields**/
    padding: 5px;
    color: #666;
    border: 1px dotted #009900;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    /**field background on focus**/
    input:focus, input:active, textarea:focus, textarea:active {
    background-color: #EBECDE;
    border: 1px solid;
    #submit {
    margin-left: 45px;
    background: #009900;
    font-size: 18px;
    color: #FFF;
    font-weight: bold;
    border: 2px outset #FFF
    #submit:hover, #submit:focus, #submit:active {
    background: #006600;
    color: yellow;
    border: 2px inset #FFF
    /**END FORM STYLES**/
    </style>
    </head>
    <body>
    <!--BEGIN HTML FORM, action="path to form-processing script on your server" -->
    <form id="form1" action="vsi2.php" method="post" enctype="multipart/form-data" name="form1">
      <h3>HTML Contact Form</h3>
      <fieldset>
        <legend>Required Fields:</legend>
        <!--spam prevention-->
        <input name="config" type="hidden" value="0" />
        <input type="text" name="nospam" style="display:none" />
        <ol>
          <li>
            <label for="first_name">First Name:</label>
            <input name="first_name" id="first_name" type="text" />
          </li>
          <li>
            <label for="last_name">Last Name:</label>
            <input name="last_name" id="last_name" type="text" />
          </li>
          <li>
            <label for="email">E-mail:</label>
            <input name="email" id="email" type="text" />
          </li>
        </ol>
      </fieldset>
      <fieldset>
        <legend>Optional Fields:</legend>
        <ol>
          <li>
            <label for="phone">Phone number:</label>
            <input name="phone" id="phone" type="text" />
          </li>
          <li>
            <label for="subject">Subject:</label>
            <input name="subject" id="subject" type="text" />
          </li>
          <li>
            <label for="message">Message:</label>
            <textarea id="message" name="message"></textarea>
          </li>
          <li>
            <label for="submit"> </label>
            <input type="submit" name="submit" id="submit" value="Submit" />
          </li>
        </ol>
      </fieldset>
    </form>
    <!--END OF FORM -->
    </body>
    </html>
    Test File:
    http://www.energymcg.com/Original/contactus.html
    Thank you for your patience and for sticking with me. I really appreciate it.
    Khalid

  • Need help with portal form

    how do I create a form where, say from scott schema, when an employee is running a form, I want to display a series of check box with all the employees that belongs to his department only???
    This user should be able to check one or all the employee within his department and pass this to a calender. I can handle the calender part.
    I just dont know how to display this list of check box in the GUI.
    --thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    hi there,
    thanks for your response, I am using Portal 3.0.9 and I have created a LOV with check box as default. But when I try to bind this LOV to a field in the form, the only way it will let me do it is through Combo box or Pop Up.
    Like you said, when I chose the field as Text box or Text area, the form doesn't even have the option to choose the LOV.
    am I missing somthing here?
    thanks a lot

  • Need help with designing form for exports

    Hi
    I am pretty new to designing form in adobe acrobat.
    I have adobe acrobat 9 standard with Adobe liveCycle Designer installed.
    There are couple of things I want to do.
    1.
    I would like to add a box where I can change the number (default is 1), and when I increase it, (for instance to two)
    then
    it will postulate the particular sections twice.
    For instance, I am taking two drugs right now, then I would like to increase the number of drugs to 2, so then for each drug
    I would enter appropriate information such as drug name, drug form, route of drug administration etcs
    I hope this is clear
    2.
    I am trying to export this in xml format so that only the ones where the user fills in in pdf form gets exported to xml format.
    I would like the boxes to have its own tag, for instance the drug name mentioned above can have a tag of <drugname></drugname>
    I know this is possible through changing the box's name in binding tab.
    What I am interested in is to add a tag for the section, like a header.
    For example, if I were to enter two drug information I want the first drug information to be exported to be
    <drug>
    <drugname>blah</drugname><drugform>1</drugform><drugroute>oral</drugroute>
    </drug>
    <drug>
    <drugname>drug2</drugname><drugform>1</drugform>
    <drugroute>ophthalmic</drugroute>
    </drug>
    how would I add <drug> </drug> for each drug?
    also, can I change the order of the tags??
    in the pdf form, if the drugname box is displayed later than drugroute box, then when I export it, it will display as
    <drugroute>oral</drugroute><drugname>blah</drugname>
    but I want to manually set the order of tags when exported.
    Sorry I asked so many questions
    I hope it is clear enough for you to visualize what I am trying to do
    Thank you so much

    1. You can certainly add sections for the number of drugs that the user specifies pr
    ovided that the form is set up the correct way to begin with. The drug information section must be wrapped in a subform (usually Poistioned) and that in turn must be wrapped in a flowed subform. Then the form must be saved as dynamic. If this information is all that is on the form then that shoudl be all you need to do. If th edrug section is in the middle of the form then you need to wrap the other parts of the form in a subform so they can be pushed down when we add the drug subforms. It can get confusing ...seeing the form amnd its structure would help to clarify.
    2. You canbnot change the names of tags on the fly but you can change their values. AS mentioned above, when you wrap the Drug information in a subform that subform name can be used as a tag in the XML. Then you could have a node with the tag (or an attribute) that names the drug in question. Something like this:
    <Drug Section>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug Subform>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug>
    </Drug Section>
    As mentioned earlier this is always easier to explain when you see it in context of your form.....if you want to send it to me at [email protected] I can get you started at least. Please include a description of your issue in the email
    Paul

  • Need help with PHP form processor coding

    I posted my first question on this forum earlier today and got help quickly. I'm going to try again and see who can help me this time.
    I have a customer feedback form that I designed and I am using Spry validation on the fields and I'm use Recaptcha as well. Now I'm trying to get the form handler working. I know there are some canned procedures out there but I hate using too much code that I don't understand at all.  I'm sure my first attempt at PHP coding is horrible but we all have to learn. My processor is working in some areas but there are holes I don't know how to fill in:
    1. When I validate the Recaptcha input, if it was entered correctly, I go on to send an email to the appropriate person BUT how do I send them a message and get back to the form if the recaptcha validation fails and still have their entries in place?
    2. Assuming the recaptcha validated correctly, my procedure sends an email  and it writes the comments to a file for historical purposes. These parts seem to be working (by some miracle). Once I do this, I think I would like to open a little window to send the customer a confirmation message, have them click the box to confirm and close the window and then take them back to the feedback form but now have it be reset. I'm not sure how to do these steps.
    Does anyone have a SIMPLE example to accomplish these steps?
    Thanks much!!
    Donna

    It would be hard to give you substantive examples of how to accomplish your goals here without seeing your PHP code, but in general the following methods would work:
    1.  To return to the form with the fields populated, is easiest when the processing script and the form code are on the same page.  The idea is that when the form is not properly completed, you fall back into the form code and use the data from the posted values to repopulate the fields, e.g.,
    <input type="text' name="whatever" value="<?php isset($_POST['whatever']) { echo $_POST['whatever']; ?>">
    or
    <select name="whatever2">
    <option<?php if(isset($_POST['whatever2']) && $_POST['whatever2']=='this_option_value') { echo ' selected="selected"'; } ?>>this_option_value</option>
    </select>
    Each field is set to repeat the posted data (if the corresponding $_POST value is set - to avoid error messages when the page is first loaded).
    2.  You can place the confirmation message on the page with CSS that hides it.  When the form is submitted successfully, just set a variable that is used to show the previously hidden message, e.g.,
    Assume the following CSS -
    #message { display:none; }
    and the following HTML -
    <p id="message">Congratulations</p>
    and the fact that you have set a PHP variable called $success to be true when the form is successfully submitted, you would just modify the HTML like this -
    <p id="message"<?php if($success) { echo ' style="display:block"; } ?>>Congratulations</p>
    Make sense?

  • Need Help with IMG+PHP Database+Selective Display

    The problem is really a lot simpler than I made it sounds to
    be, though I fear the answer might be vice versa.
    I need to have pictures appear when they exist. That's all.
    Here is where I am at:
    I have created a php database for a news announcement page.
    In that database, I have a column named "img" whose default value
    is "null"
    Whenever I actually have a picture corrosponding to a
    particular news, the "img" column will change to the file name of
    that image, which I will then extract.
    So basically... if news A, img = null... no picture. news B
    img = b... then yes picture. very simple concept for database.
    Here's what I can't do.
    When I read the database from DW, how can I make it so that
    when it reads a "null" it won't insert a picture and vice versa? I
    figure it definitely has to do with the "if" statement (duh...)
    I know how to make text do that effect...
    <? if $row_data['text'] != null
    echo("i have data");
    ?>
    but how do i do it with an image? I tried putting the image
    tag to replace the entire "echo" line, but that's apparently not
    how you do it. I tried putting it inside "echo", but that doesn't
    seem to be it either.
    also, as a premise, all pictures are associated with only 1
    particular news.
    which i wrote something similar to this:
    <img src="<?php echo $row_data['img']; ?>.jpg"
    width="200" height="200" />
    Um, basically... I need THAT to fit into the IF statement. So
    thanks in advance.

    if (!is_null($row_data['img']))
    echo '<img src="',$row_data['img'],'.jpg" width="200"
    height="200" />';
    Let's break that down into the following:
    echo '<img src="' ;
    echo $row_data['img'] ;
    echo '.jpg" width="200" height="200" />' ;
    When you string multiple echoes together use a comma between
    them,. so now
    we have:
    echo '<img src="',$row_data['img'],'.jpg" width="200"
    height="200" />';
    (You may also use a period, but my understanding is the
    period is less
    efficient.)
    I only have single quotes in my PHP statements. The double
    quotes you see
    are part of what will be the rendered HTML.
    You may generally use the single quote or double quote
    interchangeably with
    few exceptions such as having double quotes as part of the
    text or vice
    versa among others. You can probably escape the characters
    too, but lets
    keep this simple for now.
    If I misspoke I am sure Micha will be sure to correct me.
    IMO The best thing to do is learn by trial and error, and
    your best resource
    on the net for PHP is probably the php website. www.php.net
    "Bih Wang" <[email protected]> wrote in
    message
    news:gr3p0m$293$[email protected]..
    > thanks so much!
    >
    > is how i interpret the code correct?
    >
    > if (!is_null($row_data['img'])) ---> if img is false
    > echo <--- maybe i been using this without
    understanding it correctly...
    > echo
    > means to display on screen but not limited to text
    right?
    >
    > and the rest is where you lost me... i don't get the
    punctuations
    >
    > bracket double quote (" is for text right?
    > so single quote ' means to accept a php function or html
    code?
    >
    > so can i do this?
    > '<div bob>blah'
    > and have div bob appear only when the conditions are
    met?
    >
    > and external data is define by comma?
    > such as... if i pre-define value "x"
    > so i can do img src=',x,'.jpg?
    >
    > thanks again! is there a tutorial i can read for these?
    >
    >

  • Need help with image upload and preview display

    hi guys,
    I'm trying to upload image and then display it as a preview, but when upload form submits to the same page image placeholder does not refreshes it's source and displays the same image as before.
    Image 4.jpg already exists.
    I upload it with nameConflict = "overwrite"
    upload form points to the same page, therefore page reloads
    In IE image placeholder does not display the new image, but shows the old one until I refresh the page with F5 and resend information, however if checked, image in the file is already different.
    In Firefox, sometimes it works and image refreshes, sometimes not.
    any help would be greatly appreciated!
    cheers,
    Simon

    Hi Daverms,
    With your code you suggest to not only upload the image but make a database entry too. However my intention is to firstly upload the file, and show a preview. Then if user is satisfied with what he sees, he presses "aprove" button and therefore makes a datase entry. Then the photo number will increase by one.
    Until user is not aproving the photo he can upload any image again and again, but the new image will be always given the same name (example 4.jpg) and overwriting the old one.
    I believe the problem persists because browsers are loading image with the same name from the cache, and not from the actual location. Therefore when I refresh the page it catches the correct image.
    If I follow your code, every time I upload the image, name of it is different, therefore browser cannot find it in the cache and is forced to load one from the server.
    I wonder is there any way to avoid this cache problem?
    cheers,
    Simon

  • Portfolio site, need help with contact form

    Hi,
    Im a graphic designer turned web designer student. I dont know A LOT of flash, but im learning more as time goes by in and out of school. I currently redid my portfolio website, before it was more of a design taken into dreamweaver and uploaded. Now everything is not completely done, but im doing the site in flash.
    www.Nikdesigns.com, if anyones interested...
    but im trying to set up a really basic contact page. I have a name/email and message input text boxes and a submit button so far. Is there anyway someone can explain to me exactly what code I need, and what I need to do to be able to set this up correctly? Or link me a good tutorial?
    I understand flash needs a php to send the info out and comunicate with, but other then that im lost. What actionscript? and what keyframe?
    flash is so frustrating =/ someone please help, lol.

    If your contact page is just 1 of the many pages in your site, I'll recommend you write it in HTML/PHP/JSP.
    There are many cases when Flash/AS is the efficient tool to get jobs done. But just my humble opinion, I think in this case you'll be more efficient to construct the contacts page with mark-up languages.
    Of course, it is possible to do it in Flash/AS and not difficult. I just have 1 question before I go off and try:
    When an user submits the form, how do you wish to receive it? As an email in your inbox? Store it in a database? Or elsewhere?
    Cheers,

  • Help with Advanced Form Checker Checkboxes

    Hi
    Before I give my code I just want to say that the following code is in good working order.
    I will give my question/problem at the end.
    It might be a little advanced for this forum so I don't want to explain every step but,
    What the script does is it checks the form and shows a popup window after you click on
    the submit button. When one or more input boxes are empty (you will see in the the button script
    there are some advanced script checking and this must be in the correct order and is Case sensitive)
    When all the input boxes are filled out corectly as you want it to be, it gives
    another popup window asking you if your Details are correct.
    Here is the magic code
    The JavaScript validation code just below the head of your html
    <SCRIPT>
    function checkcomb(form,title)
         var result=true;
         var missinginfo = title;
         for (var i=0; i<form.elements.length; i++)
              var validateType = form.elements.getAttribute('alt');
              var validateObj = form.elements[i];
              if (validateType)
                   var params = validateType.split("|");
                   for (var j=0;j<params.length;j++)
                        switch (params[j])
                        case 'COMB' :
                             var combineObjs = validateObj.getAttribute('combine');
                             var combineObj = combineObjs.split("|");
                             result = false;
                             for (var k=0;k<combineObj.length;k++)
                                  var x = combineObj[k];
                                  for (var l=0;l<form.elements.length;l++)
                                       if (x == form.elements[l].name)
                                            if (form.elements[l].value != 0)
                                                 result = true;     
                             if (!result)
                                  missinginfo += "\n - " + validateObj.getAttribute('emsg') ;
                             break;
                        if (!result)
                             break;
         if (result)
              form.submit();
         else
              alert(missinginfo);          
         return false;
    function checkform(form,title)
         var result=true;
         var nosubmit=false;
         var missinginfo = title;
         for (var i=0; i<form.elements.length; i++)
              var validateType = form.elements[i].getAttribute('alt');
              var validateObj = form.elements[i];
              if (validateType)
                   var params = validateType.split("|");
                   for (var j=0;j<params.length;j++)
                        switch (params[j])
                        case 'NOSUBMIT' :
                                  nosubmit = true;
                             } break;
                        case 'ZERO' : if (validateObj.value == 0)
                             missinginfo += "\n - " + validateObj.getAttribute('emsg') ;
                             if (result) validateObj.focus();
                             result = false;
                             } break;
                        case 'BLANK' : if (validateObj.value == '')
                             missinginfo += "\n - " + validateObj.getAttribute('emsg') ;
                             if (result) validateObj.focus();
                             result = false;
                             } break;
                        case 'EMAIL' :
                             var re_mail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z])+$/;
                        if ((validateObj.value == '') || (validateObj.value == ' ') ||!re_mail.test(validateObj.value) )
                             missinginfo += "\n - " + validateObj.getAttribute('emsg') ;
                             if (result) validateObj.focus();
                             result = false;
                             } break;
                        case 'RANGE' :
                             var lb = parseInt(validateObj.getAttribute('mini'));
                             var ub = parseInt(validateObj.getAttribute('maxi'));
                             if (isNaN(validateObj.value) || (validateObj.value < lb) || (validateObj.value > ub))
                             missinginfo += "\n - " + validateObj.getAttribute('emsg') ;
                             if (result) validateObj.focus();
                             result = false;
                             } break;
                        case 'COMB' :
                             var combineObjs = validateObj.getAttribute('combine');
                             var combineObj = combineObjs.split("|");
                             result = false;
                             for (var k=0;k<combineObj.length;k++)
                                  var x = combineObj[k];
                                  for (var l=0;l<form.elements.length;l++)
                                       if (x == form.elements[l].name)
                                            if (form.elements[l].value != 0)
                                                 result = true;     
                             if (!result)
                                  missinginfo += "\n - " + validateObj.getAttribute('emsg') ;
                             break;                         
                        if (!result) break;
         if (result)
              if (!nosubmit)
                   form.submit();
              else
                   return true;     
         else
              alert(missinginfo);          
         return false;
    </SCRIPT>
    If you want to tidy up the abave code in your html head then just create a separate validate.js file and put this into your head
    <SCRIPT language=javascript src="scripts/validate.js" type=text/javascript></SCRIPT>
    This is the Form That fits within your html
    <FORM name=form action=preview.php method=post >
      <table width="100%">
        <tr>
          <td width="49%"><div align="right"><span class=style2><font face=arial,helvetica size=2>*
              </font>Name:</span></div></td>
          <td width="51%" valign="middle"> <input maxlength=40 size=25 alt=BLANK name=realname emsg="Please enter your Name"></td>
        </tr>
        <tr>
          <td><div align="right"><span class=style2><font face=arial,helvetica size=2>*
              </font>Display Name:</span></div></td>
          <td valign="middle"> <input maxlength=40 size=25 alt=BLANK name=displayname emsg="Please enter your Display Name"></td>
        </tr>
        <tr>
          <td><div align="right"><span class=style2><font face=arial,helvetica size=2>*
              </font>Email Address:</span></div></td>
          <td valign="middle"> <input maxlength=40 size=25 name=email alt=EMAIL emsg="Please enter your Email" ></td>
        </tr>
        <tr>
          <td><div align="right"><font face=arial,helvetica
                    size=2><span class=style2><font face=arial,helvetica size=2>*</font></span>
              Race</font></div></td>
          <td valign="middle"> <select name=race emsg="Please choose your Race" alt="ZERO">
              <option value=0 selected>Any</option>
              <option value=1>American Indian</option>
              <option value=2>Asian</option>
              <option value=3>Black</option>
            </select></td>
        </tr>
        <tr>
          <td> </td>
          <td valign="middle"><input tabindex="1"  type="file" name="img1" emsg="You must upload 1 Image" alt="ZERO" /></td>
        </tr>
        <tr>
          <td><div align="right">Language</div></td>
          <td valign="middle"><font face=arial,helvetica
                            color=white size=2>
            <input name="afrikaans" type=checkbox value=1>
            </font><font face=arial,helvetica size=2> Afrikaans<br>
            <input name="arabic" type=checkbox value=1>
            Arabic<br>
            <input name="chinese" type=checkbox value=1>
            Chinese<br>
            <input name="dutch" type=checkbox value=1>
            Dutch<br>
            <input name="english" type=checkbox value=1>
            English</font></td>
        </tr>
        <tr>
          <td> </td>
          <td valign="middle"><input name="button" type=button onClick="this.form.submitted = checkform(this.form,'Please correct the following...');&#10;if (this.form.submitted && confirm('Is the following information correct?\n\n ::PERSONAL DETAILS:: \nYour Name: '+&#10;document.form.realname.value+'\nDisplay Name: '+&#10;document.form.displayname.value+'\nYour Eamil: '+&#10;document.form.email.value+'\nYour Race: '+&#10;document.form.race.value+'\nYour Image: '+&#10;document.form.img1.value&#10;)) &#10;{&#10;form.submit();&#10;}" value=Submit... alt=NOSUBMIT></td>
        </tr>
      </table>
    </FORM>
    Please note: The code on the submit button must remain in one line as per above example.
    My Question/Problem
    If I want the person to select at least one checkbox (anyone of the for) How would I modify the code.
    I can make the javascript check the checkboxes in the form by simply adding the following code into the submit button
    +'\nYour Language: '+&#10;document.form.english.valueThis code must be in one line as per the submit button code
    And then modifying the Checkbox code like this
    <input name="english" type=checkbox value=1 emsg="Please Select this Language" alt="ZERO">But this you will find does not work as desired.
    I want the user to select any of the four languages available but at least one must be selected and no more than four languges if there are more.
    If anyone could help me modify the code I would appreciate it.

    in the onclick method of the checkbox just increment a counter when it's checked, and decrement it when it's unchecked... not exactly rocket surgery.

  • Need help with tool bar button to clear 10 fields on form

    I have 167 forms with 138 fields, I need to blank out or clear just 10 of them or so, can I create a butotn or script that is outside each document so I can open each one, andc lick this button?
    I don't want to add a button to all 167 pdf files. Or better yet script to open them all and blanks out the fields, evey form is the same so the field names are the same.

    This would be easy to do as a batch process (aka Action). The following JavaScript will do it:
    // Create an array with the list of fields to reset
    var fa = ["text1", "text2", "text32", "text4", "text5", "text6", "text7", "text8", "text9", "text10"];
    // Reset the fields
    resetForm(fa);
    This will set each of the named fields to its default value. If the default value might be different than blank, replace the last line with:
    for (var i = 0; i < fa.length; i++) {
        getField(fa[i]).value = "";
    Replace "text1"..."text10" in the first line with the actual names of the fields you want to clear.

  • Need help with a 4K Ultra-HD Display, connected to a T530

    Hi guys,
    the T530 is equipped with an intel HD4000 and a nVidia NVS5400 graphics adapter.
    I already found out in this post, that the Display Port (of the comparable T430S) is 1.1 and that instead 1.2 is needed for 4K support.
    Has anyone got better news for me, or is the desired 4K-signal stuck inside the Thinkpad forever?
    Thank you for your support!

    Your MBA should be able to detect the printer and locate the driver, install it and mount the printer. I have an HP5180 color all in one, which I have connected to my Windows PC, and my MBA sees it and prints to it just fine. Have you looked to see if Brother has a Mac driver for it?

  • Need help with final bill - where to turn?

    This seems like a silly place to ask about a billing issue, but here goes.  My final bill with Verizon Wireless is messed up.  I need to communicate with someone other than Chat - been there, done that, no resolution.  Can a Verizon rep help me here?

    Thanks for your reply in the Forum.  The account with the billing problem is (removed).
    I have paid my Verizon bill through CenturyLink for years.  I terminated my Verizon service on 8/27, the end date of my contract, and had my cell number ported to AT&T.  The most recent bill from CenturyLink had no Verizon charges.  The prior month’s bill from CenturyLink was paid, including Verizon service to the end of July.
    Last week I got a paper bill in the mail from Verizon for service for the period ending August 25.  Since I had not paid for August through CenturyLink, I sent Verizon a check for the billed amount, $35.47.
    A couple of days later I got a second paper bill from Verizon saying I owed $3.55.  It looked to me that Verizon had processed the August bill through to CenturyLink, and then reversed that transaction.  The check I mailed is not shown on the second paper invoice, and has not posted to my checking account as of a few minutes ago.
    At this point I have paid Verizon $35.47 for August service, but I have a bill from Verizon for $3.55.  Online at My Verizon the balance is $2.45.  I think I am square with Verizon and my account should be closed with a zero balance.
    Thanks.
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

  • BPEL Need help with Task Form's bindings' Claim

    Hi,
    I have a customer requirement, they want something like, if there is only one member in a group, when he views the task form from webcenter or from the worklist, the task should be automatically claimed, so he doesn't have to claim the task, and then ongo with what the task-form offers.
    I have seen that Claim method comes from the bindings to the taskDetails.jspx, the code is below which auto-claims the task:
    DCBindingContainer binding = (DCBindingContainer)getBindings();
    DCIteratorBinding iter = binding.findIteratorBinding("taskIterator");
    OperationBinding bind = bindings.getOperationBinding("Claim");
    bind.execute();
    However, there are two problems with this approach.
    1) The Task Form isn't getting updated with the buttons that comes after claiming the task(yes-no-approve-reject-whatever).
    2) If the task is allready claimed, there is an exception.
    The second one, I can manage to overcome somehow, but the first one, I am asking you damn it :)
    Any help would be most appreciated!

    Can someone please help?

  • Need help with margins & footer, and browser display issues....

    Hello,
    I am working on a splash page in Dreamweaver, but am having trouble with the margins and the footer.
    1. Margins: I basically want/need the center contents of the page never to extend past the contents of the header and footer.
    If you look at the page header, the logo on the top left and "Student and Faculty Portal" should be the margins. Seems to look fine on some users' systems, but not consistent across our department.
    2. Footer:  I can't seem to figure out how to keep the footer at the bottom without rising above the background image across all browsers & screen sizes.  Looks fine on some, but too high or low on others. (Looks the worst when the background image shows underneath the footer).
    3. Browser/Screen Size:  Depending on which PC I am using, my page changes.  At the office, on my 26" monitors, my page looks fine, however, when on different laptops, my right div (that contains the login table) goes under the left.  How can I code my page so that it looks consistent on all?
    I guess my main complaint/need is for my page to look consistent regardless of screen size, browser or system.
    If you could take a look, I would greatly appreciate it.
    Your expertise and time is greatly appreciated.  I hope I was clear enough, but please let me know if there is any confusion.
    http://www.saintleo.edu/PortalLanding/PortalSplash.html
    Kind regards,
    JK

    1.  Create a div around your content, give it a width and margin: 0 auto;
    2.  Follow this tutorial.  It will be a lifesaver and it sounds like what you are trying to do: http://css-tricks.com/snippets/css/sticky-footer/
    3.  See #1.  In addition, remove right-margin from login box, add float: right; and remove float: left; from main content.

Maybe you are looking for