Stupid Noob Question About Form Validation

I can't get this code to work. Can some kind-hearted soul
look at it and tell me what stupid thing I'm doing wrong? It
processes the output of a contact or email form. The field "status"
is indeed defined on the form as a hidden field. When I enter
appropriate text in the fields of the form, it takes me to
"error.cfm" every time. Here's what I'm entering in the form for
testing purposes:
fromemail = [email protected]
yourname = Jack
phone = 407-755-0757
message = Message
Here's the code that processes the form output:
<cfset emailIndex = FindOneOf("@aeiou",
form.fromemail)>
<cfset nameIndex = FindOneOf("aeiou", form.yourname)>
<cfset phoneIndex = FindOneOf("123456789",form.phone)>
<cfset messageIndex = FindOneOf("aeiou",form.message)>
<!--- Check to see if the form was submitted. Also check
for valid data in each form field. --->
<cfif isDefined("form.status") AND form.status eq
"sendemail" AND emailIndex GT 1 AND nameIndex GT 1 AND phoneIndex
GT 1 AND messageIndex GT 1>
<!--- If the form was submitted, send the email! --->
<!-- NOTE: Hosting company email security requires that
the username, password, and server name be included in the
ColdFusion code. -->
<cfmail to="[email protected]"
from="[email protected]"
username="[email protected]"
password="correct_password_verified"
server="correct_server_verified"
replyto="#form.fromemail#"
subject="Email From website"
failto="[email protected]">
This message is from: #Form.yourname#, #form.fromemail#,
#form.phone#
#FORM.message#
</cfmail>
<cflocation url="success.cfm">
<cfelse>
<cflocation url="error.cfm">
</cfif>
The form is located at
http://www.GwenHarrison.com/contact/contactme.cfm.

The "error.cfm" only appears when the initial <cfif>
statements comes back as false. Meaning if it fails ANY of the
criteria it will go to "error.cfm".
1. What is "FORM.status" -- is that the submit button?
a. If
yes to above, then is "sendemail" the name of the submit
button?
2. Instead of doing "emailIndex GT 1 AND nameIndex GT 1 AND
phoneIndex GT 1 AND messageIndex GT 1" do this:
<cfif isDefined("FORM.status") and FORM.status eq
"sendemail" and isdefined("FORM.fromemail") and FORM.fromemail NEQ
"" and isdefined("FORM.yourname") and FORM.yourname NEQ "" and
isdefined("FORM.phone") and FORM.phone NEQ "" and
isdefined("FORM.message") and FORM.message NEQ "">
HI
<cfelse>
<cfdump var="#form#">
</cfif>
Report back what you see.

Similar Messages

  • 2 noob questions about speaker settin

    . What if I don't sync the Creative speaker settings with windows control panel speaker settings?
    2. What if I the speaker settings(both Creative and windows) don't match my speaker type?For example, I have only headphone connected to my Audigy 2 ZS but I set the speaker setting to 5. or whatever else. Will this improve my sound quality in games such as Battlefield 2? Am I?supposed to get the virtual 5. surround sound effect? Because I've heard that cmss upmixes stereo sound in?games to virtual 5. or 7. surround sound for headphones.
    Thanks.
    Message Edited by jermin on 06-24-2008 02:09 PM

    Re: 2 noob questions about speaker settings?slightlys I have a slightly different set up.
    I have 5. speakers that I use for movies and some games. For BF242 I use headphones because they give you an advantage as you can hear people creeping up behind. The virtual surround sound is really good with my XFi xtremeMusic.
    First I don't think it matters what you select under Windows Control Panel as the Creative Console Launcher updates speaker settings in Windows. Second if you want virtual 3d with CMSS on headphones just select headphones and enable CMSS3D. Then click the 'headphone' button on the CMSS3D tab and you can test the sound - a helicopter pans around in 360 degrees.
    Then in games set the software to output 5. - AFAIK. Battlefield seems to do this automatically but I can't speak for other games. I'm assuming the Audigy has the same CMSS3D tech that the XFi has.

  • Follow-up question about forms and SharePoint Online

    I asked a question about life after InfoPath earlier, and got a good answer:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb23b3d9-8a09-4267-aab5-09929f6a3082/life-after-infopath-seeking-advice
    After looking at all of the limitations of SharePoint Online, I'm wondering how developers are dealing with the limitations. Lets say you are asked to develop something that has complex logic, including fetching data from external web services, dynamically
    displaying parts of a process to people depending on role, and ending up with a printable document. In our on-premises environment, InfoPath is well suited to this task, with some code behind for some things. Or, if not using InfoPath, we would use application
    pages and workflow.
    Neither of those are available in SharePoint Online, so what would you do?

    Some things, such as the conditional display of content, can be done via JavaScript. More advanced items, such as integrating external web services would likely require a SharePoint "app". A SharePoint app is essentially a link to a separate site
    that is running an asp.net web app (or PHP, or whatever). This asp.net site can do anything it needs with any web services, or conditional formatting, or anything. Because it's registered as a SharePoint app, it can also call back into the SharePoint site
    and work with data. So, a SharePoint App could present the user with a robust form that simply sends the data back to a SharePoint list. The SharePoint app can also be surfaced on the SharePoint site itself in an iframe, so the user won't know that the form
    is hosted by another server.
    By the way, the ideas behind the app model permeate the entire SharePoint environment: instead of having the SharePoint server itself run all kinds of custom business logic, that workload is handled by other servers, so the SharePoint servers can be focused
    on running the core bits of SharePoint. InfoPath puts a large load on the servers, so it's out.  XSLT list views also put a load on the server, so they're also out. SSRS is an amazingly fantastic tool, but is not supported in the cloud (and there's no
    alternative). Timer jobs, event handlers, workflow, and many other things have been re-architected to take the load off the SharePoint servers.
    Mike G.

  • Noob question about launching apps

    Greetings all,
    Just made the switch to a Powerbook with OS X Tiger, and have a question about launching applications; specifically how to do so without using the mouse. On my Linux boxes (one at home, one at work), I do most of my work from the keyboard, without resorting to the mouse, even in Gnome or KDE.
    In Tiger, I can select applications on the desktop, but haven't been able to figure out how to launch them without "clicking"... I've Googled and searched these forums, but no luck so far. Under Linux, it's the Enter key. I assume in Tiger it's some key combination...
    I know there's probably a simple answer, but I've not been able to happen upon the appropriate key combo it at random, so I thought I'd ask the experts.
    Be gentle, I've only had my PB a week!

    To help you in your quest to keep your hands on the keyboard you should check out apps like LaunchBar and Quick Silver. Your hands will never (well... rarely) leave the keyboard again.

  • Question about XML validation against schema

    My question is probably a basic one about XML. I tried PurchaseOrder example from the book "J2EE Web Services" by Richard Monson-Haefel. A simplified version as followings -
    Address.xsd -
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.netbeans.org/schema/Address"
    xmlns:addr="http://xml.netbeans.org/schema/Address"
    elementFormDefault="qualified">
    <element name="address" type="addr:USAddress" />
    <complexType name="USAddress">
    <sequence>
    <element name="name" type="string" />
    <element name="street" type="string" />
    <element name="city" type="string" />
    <element name="state" type="string" />
    <element name="zip" type="string" />
    </sequence>
    </complexType>
    </schema>
    PurchaseOrder.xsd -
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.netbeans.org/schema/PurchaseOrder"
    xmlns:po="http://xml.netbeans.org/schema/PurchaseOrder"
    xmlns:ad="http://xml.netbeans.org/schema/Address"
    elementFormDefault="qualified">
    <import namespace="http://xml.netbeans.org/schema/Address" schemaLocation="Address.xsd" />
    <element name="purchaseOrder" type="po:PurchaseOrder" />
    <complexType name="PurchaseOrder">
    <sequence>
    <element name="accountName" type="string" />
    <element name="accountNumber" type="unsignedShort" />
    <element name="shipAddress" type="ad:USAddress" />
    <element name="total" type="float" />
    </sequence>
    <attribute name="orderDate" type="date" />
    </complexType>
    </schema>
    Then PurchaseOrder.xml is -
    <purchaseOrder orderDate="2007-12-12"
    xmlns='http://xml.netbeans.org/schema/PurchaseOrder'
    xmlns:addr="http://xml.netbeans.org/schema/Address"
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation='http://xml.netbeans.org/schema/PurchaseOrder ../xsd/PurchaseOrder.xsd'>
    <accountName>Starwood</accountName>
    <accountNumber>220</accountNumber>
    <shipAddress>
    <name>Data Center</name>
    <street>1501 Washington St.</street>
    <city>Braintree</city>
    <state>MA</state>
    <zip>02148</zip>
    </shipAddress>
    <total>250</total>
    </purchaseOrder>
    Then I did a XML validation but have this error -
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'name'. One of '{"http://xml.netbeans.org/schema/Address":name}' is expected. [19]
    It complains <name> tag in <shipAddrss> needs namespace of "http://xml.netbeans.org/schema/Address". Why?
    Is it possible to change XML so it does not need name space for elements inside <shipAddress>?
    Thanks

    Hi Madhura,
    see here my comparison of the web version against the local file version on my Windows box (which is itself not the fastest): It makes a factor 16 in difference!
    C:\Temp\xsdvalidator>java XsdValidator madhu.xsd madhu.xml
    cvc-pattern-valid: Value 'provamail.it' is not facet-valid with respect to patte
    rn '[^@]+@[^.]+[.].+' for type 'EmailType'.
    NOK - Validation error
    Elapsed time: 16353 ms
    C:\Temp\xsdvalidator>java XsdValidator madhu_local.xsd madhu.xml
    cvc-pattern-valid: Value 'provamail.it' is not facet-valid with respect to patte
    rn '[^@]+@[^.]+[.].+' for type 'EmailType'.
    NOK - Validation error
    Elapsed time: 994 ms
    Obviously, the w3c.org domain that you specified as ressource location is very slow - and, as the FAQ shows, this delay is intentional!
    The W3C servers are slow to return DTDs. Is the delay intentional?
    Yes. Due to various software systems downloading DTDs from our site millions of times a day (despite the caching directives of our servers), we have started to serve DTDs and schema (DTD, XSD, ENT, MOD, etc.) from our site with an artificial delay. Our goals in doing so are to bring more attention to our ongoing issues with excessive DTD traffic, and to protect the stability and response time of the rest of our site. We recommend HTTP caching or catalog files to improve performance.
    --> They don't want to have requests to their site from productive servers all around the world.
    Regards,
    Rüdiger

  • Questions about forms users once the form is completed

    I am on a Macintosh platform, OX 10.5 (Leopard), using Adobe Acrobat Professional that came with CS3 (version 8 I believe - I am not in front of that computer at the moment). I have creted a few forms in LifeCycle, but now my boss wants this to be completely Mac so Monday I need to start creating them in a Mac. I know the basics of how to create a form from a pdf file.
    Here are my questions:
    1 - Acrobat 8 is so old I can't find any help information in the Adobe help section. Everything that says version 8 takes me to X or XI when I click on the link. Does anyone know where I might find some help with this version?
    2 - How do I create a form that the person using can save with the data, the completed fields, so they can open it again and look at what they filled in?
    3 - As a corrollary to number 2, how can we also get the data?
    4 - We want to take a booklet that has been paper up to now, create a pdf, and then number them to sell for one use only.  Is there any way to make a form one-time-use only, so it can't be passed on to someone else to also complete?
    I appreciate any help I can get. Thank you.

    2. You need to apply the Extended Reader Rights. In version 8 I believe it was under the Advanced menu.
    3. The users can submit the file back to you in various formats, such as PDF (the entire file), FDF, XML, etc.
    You can add a submit button to the file that will help them do that, or they can just do it themselves.
    4. Impossible, unless you use some kind of DRM technology, but those are extremely expensive.

  • Stupid simple question about checkboxes

    Hi I have two fields in my form that I want designated as checkboxes... a user is either internal or not. I keep reading about checkboxes... that they return True/False or Yes/No. I have tried both, but cannot chenge the value of the checkbox or the database field associated with it. How do I
    A) get the value of the checkbox (checked/unchecked)
    b) change said value into a 'Y' or 'N' so it can be entered into our table?
    Here's the code I'm attempting to use:
    declare
    iProgSeq integer;
    Projno integer:=p_session.get_value_as_number(p_block_name=>'DEFAULT', p_attribute_name => 'A_PROGRESS_PROJECT_NUMBER');
    cActive varchar2(3);
    cInternal varchar2(3);
    begin
    cActive:=p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'A_PERSON_ACTIVE_IND');
    cInternal:=p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'A_PERSON_INTERNAL_IND');
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_PERSON_USER_ID',
    p_value => portal.wwctx_api.get_user
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_PERSON_ACTIVITY_DATE',
    p_value => sysdate
    if cActive = 'NO' then
    cActive:= 'N';
    else
    cActive:= 'Y';
    end if;
    p_session.set_value(
         p_block_name => 'DEFAULT',
    p_attribute_name => 'A_PERSON_ACTIVE_IND',
    p_value => cActive
    if cInternal = 'NO' then
    cInternal:= 'N';
    else
    cInternal:= 'Y';
    end if;
    p_session.set_value(
         p_block_name => 'DEFAULT',
    p_attribute_name => 'A_PERSON_INTERNAL_IND',
    p_value => cInternal
    doInsert;
    end ;
    --p_session.set_value(
    --p_block_name     => "_block",
    --p_attribute_name => '_STATUS',
    --p_value          => 'oops');
    --null;
    return ;
    Why are checkboxes (which you'd think would be pretty straightforward) such a pain?

    ANYONE?! This is urgent, please help!

  • Questions about Forms 11g !!!!!!!

    Hi,
    I have few questions regarding Oracle Forms & Reports 11g. I have installed Oracle Forms and Reports 11g on Linux and it is working and running fine. In our environment, all the operating systems are on Linux like Database Server, Fusion Middle Ware and our client's machines are also on Linux. My questions are below;
    1) This time only I am accessing Forms and Reports Developer from my Linux machine, Can more than one developer access Forms and Reports Developer from their machines?
    2) During Reports migration from 6i to 11g Linux, how I can keep the same Reports font on 11g Reports
    3) Can I keep the same Forms 6i short cut keys in Forms 11g, like F7 for Enter Query, F8 for Execute Query, F10 For saving record instead of using F11 for Enter Query, Ctrl+F11 for Execute Query, Ctrl+S For saving record?
    4) When I run my Application "Oracle Forms Services Oracle Fusion Middleware 11g" message comes. Can I display my own message?
    5) What is the best practices for migrating 6i Application into Oracle Forms 11g Linux.
    Thanks in Advance,
    Yousuf.

    You can find the "Forms 6i to 11g Migration" document here:
    http://download.oracle.com/docs/cd/E15523_01/doc.1111/e10394/toc.htm
    Other upgrade documents (including Reports/Portal, etc) can be found here:
    http://download.oracle.com/docs/cd/E15523_01/upgrade.htm
    Hope this proves useful
    R/ Zaf

  • Noob question about trying to duplicate rows in a table

    Simplification of problem is I've got a table with user_id, name, year where user_id is pk. I would like to take all the rows that match year=2008 and insert them into the same table, but start the user_id at a certain number and set year=2009.
    I know this doesn't work, but it's what I want to do in noob-code:
    INSERT into TABLE (
    user_id, name, year
    ) VALUES (
    SELECT user_id_seq.nextval after starting at 3500, name, 2009 from same table doing insert to where year = 2008
    I've contemplated using a temporary table, I've also seen mention of cursors, but don't quite understand what they are. I'm really, really new to Oracle and SQL in general, but am familiar with programming and shell scripts. I know more in depth searching might land me what I want, but I think my search syntax would be just as weak as my knowledge of the material. I'm just thinking this is something so basic and easy that my searches aren't using the right terms to catch a hit.

    Hi,
    Welcome to the forum!
    You can INSERT all the results of a query by substituting the query where you otherwise would have "VALUES (list)".
    For example:
    INSERT into TABLE_X
           (user_id,              name,  year)
    SELECT  user_id_seq.NEXTVAL,  name,  2009
    FROM    table_x
    WHERE   year = 2008;This assumes that the sequence user_id_seq exists and is ready to issue the correct value. (It's unclear if that's part of the problem.)
    Temporary tables and cursors (which are a way of getting query results in PL/SQL) are only useful for inserting in rare situations, where you have to do very odd, convoluted things. Think (at least) twice about how to do what you need to in SQL, and if you can't think of a way, then ask.
    Yes, basic things often are hard to search for, especially if you don't know the right terms.
    There are several good teach-yourself SQL books that explain this kind of thing. Getting one would be a good investment.
    [All the Oracle manuals|http://www.oracle.com/pls/db111/portal.all_books] are on line. There's an example of this in the SQL Reference manual, under THE INSERT command.
    Edited by: Frank Kulash on Nov 26, 2008 12:59 PM
    Clarified usefulness of cursors. They have a lot of good, common functions, but helping with INSERTs is not one of them.

  • Noob question about Airport

    I have one of the early G5 PowerMacs (single 1.6 gHz). It currently doesn't have an Airport card, but I'd like to install one or an equivalent. Here's my two questions:
    1.) Are all G5s compatible with Airport Extreme cards?
    2.) Are there good third party alternatives out there?
    I wish Apple would be clearer about what systems are "Airport Extreme Ready".
    Thanks in advance!

    The Airport "Extreme" card for your G5 is here
    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wo/1.RSLID?mco=3 93BD37&nplm=M8881LL%2FA
    An alternative here but no cheaper
    http://www.macwireless.com/html/products/11g11bcards/11gPCI.php

  • Noob question about HDR images

    hi everybody! i am reading this book about photoshop hoping to understand a lot more than i already know about pixels and colors and image dinamics and such..i got to the chapter about HDR images and here's what i dont get. as i understand, given a HDR image it has 32 bit depth meaning its file contains much more information about contrast and brightness than any existing monitor can output, so when u open it in photoshop u will never see its true quality. my question is( and i admit it may seem pointless to some, but i am committed to understand the cause and purpose), when converting it to 8 or 16 bit depth this window pops up asking me to tweak gamma, exposure, shadows and highlights, etc., but why is this linked to the conversion process? why not simply convert it, maintain the same appearance as before and then if needed manually adjust using all the image controls from the photoshop menus? i have CS6, if that matters.

    I don't know if this will help, but I've heard about HDR monitors (still very expensive), which supposedly very accurately display the HDR values. If you hang one on the wall in your house, people might think it's a window, since it is literally a source of light, in the same way a window to the outside world is.
    Possibly the most surprising use of HDR imagery is in 3D apps where global illumination models are used. HDR imagery literally is the only source of light for these images. There are no lights in the scene, only HDR imagery. This is because of the great dynamic range of HDR.
    A more practical (to me) use of HDR is when resurrecting antique images. If you scan multiple exposures from old prints, then create HDR, sculpting values in 16-bit becomes a very powerful tool, only due to the HDR value range.
    Photoshop, although it can edit very well in 16-bit, can only show 8-bit representations of HDR imagery, since almost all monitors are 8-bits per channel. Because of the monitors, we can only see a small part of what is actually present in the HDR file.
    I've never done it, but I imagine that if we all had HDR monitors, we'd need to wear protective glasses (like you wear driving in your car when the sun is out) most of the time to do our work.  :+)

  • A noob question about precedence...

    Ok, here's the question.
    let's say:
    int a=0;
    a=a++;
    when a is evaluated, 0 is returned.
    isn's that expression like this?
    a=a=0;
    a=a+1;
    apparently I'm wrong.
    so if i forced a parentheses on it
    a=(a++);
    but again, a is evaluated as 0,
    I know how ++a would work, but i'm really curious about the suffix one.
    can any one explain to me?

    i mean how no matter what u do to
    a=a++
    i know in this case that a is evaluated first b4 it is added to 1,
    but it's gona add that 1 eventually right? so the evaluation of
    a in the en should be 1.
    Ah, I'm so confused, help

  • Noob question about DIV tags

    Learning DW and CSS so patience is in order .
    I've being reading numerous posts here and on the web about avoiding tables for laying out web pages. I can see the advantages in terms of cleaner codes and easiness of updating and changing sites at a later time. So I started learning about DIV tags (although tables is very easy for me) and have practice a few times with fairly good results, love the absolute positioning with it. Having said that, for the love of me, can't find a way of centering horizontally a page designed with DIV tags (due to ignorance), for example, 1 column/three rows page, after defining styles, size and colors I enclosed everything in another DIV tag, wrapper I think is called, but have not found a way of centering it on the page, text-aligment on the DIV tag only centers the text not the DIV itself, how to go about this? Help is appreciated.

    love the absolute positioning with it.
    Get over it.  It's a trojan horse.  Absolute positioning is not a general layout method.
    To center ANY block (non-absolutely positioned) element, use CSS to give it a width and left/right margins of 'auto'.  For example -
    <div id="foo">...</div>
    That div will be centered with this CSS -
    #foo { width:300px; margin:0 auto; }
    I think you are on the wrong path already, though.  Stick with tables (which you say are very easy for you) UNTIL you a) understand CSS well enough to understand what absolute positioning is and why I say it's bad, and b) understand how to use float, margin, and padding to place things on the page.  Then you are ready to move away from tables.

  • [SOLVED Noob question about web server permissions

    Hi I have setup up succesfully my web server. Now I am having some permission's questions/problems.
    First of all, I want the /home/httpd/home folder not to be show to the other machine users and only to root.
    I have created a user www-data and I have conf the apache file.
    This is my settings:
    My server directory is: /home/httpd and the permissions I have set:
    home dir:
    ~edited because solved~
    I have set .htaccess to some folders. I don't know If the permissions are safe or not. Can you help me?
    I think that I have different permissions to files and different to the folders...
    Thank you!
    Edited:
    And an example of my permission (phpMyAdmin):
    ~edited because solved~
    Last edited by k3rn31 (2008-02-28 22:26:09)

    This is more of a chat item for me, if you feel like it you can find me most of the time here at http://zaxter.org/xmpp.html if you have flash you can join via a simple click on connect.
    Sorry I've not been of much help to you.

  • Stupid noob question:  Will Mac OS install on an intel-based machine ....

    .. that previously was running Windows?
    I have a friend (really - it's not me) who is considering moving to Mac OS, but doesn't want to buy a new box. I'm pretty sure the answer is "no", but I thought I'd take the temperature of the experts.
    Thanks.

    If I understand your question, your "friend" wants to install it on a non-Mac Intel chipped box. It can't be done without violating the EULA agreement and it can't be done without a long series of hacks. Violating the EULA will result in Steve Jobs taking your first born child, the hacks will result in a Frankenmac.

Maybe you are looking for

  • Error when try to call a pl/sql procedure from the .xsql file

    I tried to call a pl/sql procedure like this: <?xml version="1.0"?> <page connection="omtest5" xmlns:xsql="urn:oracle-xsql"> <xsql:include-owa> sampleowaxml.testone </xsql:include-owa> </page> but I got the following error message: <?xml version="1.0

  • Apple tv updating problem.

    when i was updating my apple tv the power were cut off now the device is not displaying anything also the white light at its front is flashing. can anyone help me ?

  • A procedure with a buffer too small problem

    hey! while running a procedure for loading data from csv file into a db table (on 9i db), i got the error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small". It's make scense since i have a large csv file (2 columns ,about

  • Member only area in Muse

    I am starting to work with Adobe Muse. I need a members only area in that website and I am hosting it on BC. Can that be done? And how? Thank you Alfred [email protected]

  • " LogicPro has detected a possible conflict error "

    Hi All, I know this has been flagged before as a known issue but I cant see a specific answer based on my set up. Error message : " LogicPro has detected a possible conflict between one or more third party midi or audio drivers " Background : I have