Multiple forms in JSF not working

Hi
I am using JSF 1.1 via WebSphere 6.1 and am having problems with multiple forms in a jsf page. I have a search command button on the page and a bunch of command links in a datatable. I have a h:form for the command button and another h:form for the datatable.
The command button works fine. But the links don't. They just show the same page again and the action behind the commandLink is never called. I see many posts from way back about multiple forms not working in a jsf page.
Is there a fix or workaround to this problem?
Any pointers would be much appreciated.

All replies so far have focused on solving multiple form issues. I have no problem with multiple forms per page but exactly like the original poster I can not get my h:commandLinks to work when embedded in a h:datatable.
I have command buttons before and after the data table working great, but for whatever reason command links just do a post back to the backing bean.
At this point I am not even trying to process data, just verify the action method is being executed.
Another item of note, the links will always post to the same bean regardless of what bean is referenced in action="...."
Any ideas?
Message was edited by:
jasontc
It appears once the page is rendered for the first time any future rendering will display the link(s) but the link(s) will be junk.
I ran a test with a pre populated ArrayList for my datatable, link worked. I then reload the datatable with a different ArrayList and the link is still referencing the original item in the list. So the action method I want to call is called but the .getRowData is incorrect. In addition of the number of items in my list grows the links become junk beyond the original size of the list.

Similar Messages

  • In dev server my payment advice form f110_prenum_chc  is not working

    hi,
    friends i need urgent help.
    1) i have copied f110_avis_in frm 000 client to 200 client with form name
       z_prenum_dup.
    2) i have copied f110_prenum_chc frm 000 client to 200 client form name
      zf110_prenum_chc1.
    3) then i modified my both forms in 200 saved assigned TRs and
    transported frm DEV server to PRD server(client 700).
    4)in dev server 200 client my both forms are working
      but in prd server 700 client my form cheque z_prenum_dup is
      working but payment advice form zf110_prenum_chc1 is
    not working.
    5) but i can see my both forms r their in 700 prd server in se71 t.code.
    6) if i run f-58 tr.code and by switching on debug mode i can see my
       cheque form but not payment advice form.
    7) if i run in 200 client i can see my both forms.
    can any body plz help me out of this issue.

    Dear,
       I will be able to put some points, if you can give me some more idea about ur problem,
    1, Does system giving any error..?
    2, Can you see a preview..?
      As I understood, it must not have any problem in transportation.
      You can also check with Respective functional consultant whether he has done with required customization in NACE..?
      One more thing you can do is,
      open a program RSNAST00 and put break point at "  PERFORM (tnapr-ronam) IN PROGRAM (tnapr-pgnam) USING returncode", here you can check at runtime ( While in debugging mode) the value of field TNAPR-FONAM, this value must be your SmartForm.  If it is not the case then, there is problem with NACE settings and contact your functional counterpart.
    Hope it's helpful .......Enjoy.
    Regards,
    Chetan

  • Infopath form load rule not working in browser forms but works on Client

    Hi
    I am working on an Infopath form and there are rules on form load. The form load checks for a value in a list, if the username() matches the one in the list, then the form would change its view.
    It works when I open it on client, but on the browser it fails.
    Have anyone encountered such an issue.

    Check below:
    http://stackoverflow.com/questions/16222681/infopath-rule-is-not-running-when-checking-sharepoint-list-field-value
    Ensure that "Include data for the active form only" was checked (I had to separate this field into another data connection because that box could not be checked for another field I was using), and
    Ensure that in the rule I was selecting from the "dataFields" folder under the data connection instead of "queryFields"
    http://sharepoint.stackexchange.com/questions/28554/infopath-form-load-rules-not-working
    if I edit the Infopath form on Infopath 2007, it seems that the rules for the load form will be visible if created.
    This look like a bug. Here are the steps below that will lead you to the bug:
    Step 1: Open the infopath form in Infopath 2010 and create 6 rules for Form Load and Save it as a file.
    Step 2: Open that infopath form that you created in Step 1 in InfoPath 2010 and go to the
    Form Load section. You will only see the first 5 rules. The 6th rules that you created for Step 1 will just "vanish". Now, close that infopath form.
    Step 3: Open that infopath form that you created in step 1 in InfoPath 2007 and select Tools > Form Option. In the
    Open and Save category, click the Rules button and add a new rule in it and save it.
    Step 4: Open that infopath form that you modify as describe in Step 3 in InfoPath 2010. That 6th rule will be visible.
    Therefore, there might be a bug in InfoPath 2010 that restrict Rules to a max of 5 in Form Load and thus if anyone open that form in SharePoint, only the first 5 rules will be executed.
    If this helped you resolve your issue, please mark it Answered

  • Help - Multiple native extensions do not work

    Dear Adobe Air developer community and Adobe employees,
    My game dev. studio www.GoldSunGames.com is nearing completion on our biggest title developed with Adobe Air for iOS. During development we've hit countless  technical bumps in the road including issues with low memory, low performance and many others I can happily say have now been solved in big part to the help we've received from the Adobe Flash/Air community. Thanks!
    I am now reaching out to the community and any Adobe employees reading this to solve our last remaining major issue/bug with Adobe Air which is holding us back from releasing our title.
    Multiple native extensions do not work
    We can get any one single native extension to work including Game Center (with the help of MilkManGames). But multiple extensions together simply do not work. We are required by our publisher to have other iOS features included which require the use of multiple native extensions.
    A detailed break down of the programming process we are using can be found here:
    http://forums.adobe.com/thread/923158?tstart=0
    Any and all help is greatly appreciated. Free copy of the game in question "Megaplex Madness 2" to the problem solver or solvers.

    Thanks to Saumitra Bhave the problem has been solved!
    >> Does http://forums.adobe.com/message/4026961#4026961 help?
    Thanks

  • When i compare multiple attribute it is not working in MDX query

    Hi All,
    i have create a measuer please see below code,
    MEMBER [Measures].[a] as
    case when
    [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide"  //Working
    then "1"
    when [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Herbicide"  //Working
    then "1"
    when  [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed" //Working
    then "3"
    when ([DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide" //Not working
    and [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed")
    then "1and2"
    when  ([DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide"  //Not Working
    and [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed"  )
    then "1and3"
    end
    when i compare multiple attribute it is not working.

    Hi manishcal16PPS,
    According to your description, your calculated measure is not working when two when statement together. Right?
    In this scenario, since the conditions in your case when statement are exclusive, you should use OR instead of AND operator.
    when  ([DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Fungicide"  
    OR
    [DimProduct].[Portfolio].CURRENTMEMBER.MEMBERVALUE="Seed"  )
    then "1and3"
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Is it still the case that the Muse CC Forms widget will not work properly unless you have Business Catalyst?

    I am looking into options for our next office website redesign.  We will definitely need a forms function.  I downloaded the Muse CC free trial and went through all of the tutorials.  The video on the forms (Contact Form) stated that the forms widget would not work or would not work properly if you do not have Business Catalyst.  I'm hoping that has changed since the video was created.
    Is this still true that you need to purchase the Business Catalyst product for Muse CC form widgets to work correcty??? 

    Piruki have you tried utilizing the Previous version option within the Creative Cloud Desktop application?  You can find additional details under the install Previous version section of CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • Multiple values in prompt not working..

    I am able to create prompts using Java/ BO-SDK and i am also able to set values to these prompts; but the values in the report in Infoview are not getting refreshed. for e.g if a single value for city prompt is entered the code works fine but if i set multiple ";" separated values to this city prompt the values are not getting refreshed.
    Here is my code for prompts:
    function to set filter conditions
    public static void setFilterConditions ( final DocumentInstance doc,final List<ConditionFilterDataItem> filterList )
            final DataProviders dps = doc.getDataProviders();
            final DataProvider dp = dps.getItem(0);
            final Query q = dp.getQuery();
            ConditionContainer conditioncont = (OMConditionContainer)q.getCondition();
            if(conditioncont!=null)
                 conditioncont.removeAllChildren();
                   createPrompt(doc, filterList);
                 applyValuesToPrompt(doc, filterList);
              doc.setPrompts();
              dp.runQuery ();
              doc.refresh();
    function to create prompts.
    public static void createPrompt( final DocumentInstance doc,final List<ConditionFilterDataItem> filterList)
            System.out.println("Inside create Prompt method ");
            final ReportDictionary reportDict = doc.getDictionary();
            final DataProviders dps = doc.getDataProviders();
            final DataProvider dp = dps.getItem(0);
            final Query q = dp.getQuery();
            ConditionContainer conditioncont = (OMConditionContainer)q.getCondition();
            ConditionFilterDataItem conditionFilterDataItem = null;
            conditioncont = q.createCondition(LogicalOperator.AND);
              for(int i=0;i<filterList.size ();i++)
                      conditionFilterDataItem = filterList.get ( i );
                      final String[] operands =  conditionFilterDataItem.getFilterOperand ();
                      final ReportExpression reportExpression = reportDict.getChild
                            ( reportDict.getChildByName ( conditionFilterDataItem.getQueryObject ()).getID () );
                      final String objectName = conditionFilterDataItem.getQueryObject();
                      final DataSourceObject dataSourceObject = reportExpression.getDataSourceObject ();
                      ConditionObject conditionObject = null;
                      conditionObject = conditioncont.createConditionObject ( dataSourceObject );
                      final FilterCondition fc = conditionObject.createFilterCondition
                            (Operator.fromInt ( conditionFilterDataItem.getOperator ()-1));
                      ConditionPrompt condPrompt = fc.createConditionPrompt("Enter value of "+objectName+":");
                      condPrompt.setConstrained(false);
                      condPrompt.setMonoValue(false);
                      System.out.println("Prompt created for object name ::"+objectName);
                     if( operands.length > 1 && operands[1]!=null)
                          ConditionPrompt secondPrompt = fc.createConditionPrompt("Enter another value of "+objectName+":");
                          secondPrompt.setConstrained(false);
                          secondPrompt.setMonoValue(false);
                          System.out.println("Another Prompt created for object name ::"+objectName);
                      doc.applyFormat();
                 dp.runQuery();
                  doc.refresh();
                  doc.save();  
    function to set values to prompt
    public static void applyValuesToPrompt(final DocumentInstance doc,final List<ConditionFilterDataItem> filterList)
            final DataProviders dps = doc.getDataProviders();
            final DataProvider dp = dps.getItem(0);
            final Query q = dp.getQuery();
            ConditionContainer conditioncont = (OMConditionContainer)q.getCondition();
            ConditionFilterDataItem conditionFilterDataItem = null;
            Map promptMap = generateInstanceMap(doc);
            OMFilterPrompt[] promptArr;
            if(filterList.size()==conditioncont.getChildCount())
                      System.out.println("conditioncont.getChildCount() "+conditioncont.getChildCount());
                      for(int i=0;i<filterList.size();i++)
                           System.out.println("FilterLsit size is "+filterList.size());
                           System.out.println("current value of i is "+i);
                                conditionFilterDataItem = filterList.get ( i );
                            final OMFilterSimple filter = (OMFilterSimple)conditioncont.getChildAt(i);
                            System.out.println( conditionFilterDataItem.getOperator ()+"  conditionFilterDataItem.getOperator ()");
                               System.out.println(conditionFilterDataItem.getQueryObject()+" conditionFilterDataItem.getQueryObject()");
                            final String[] operands = conditionFilterDataItem.getFilterOperand();
                            System.out.println("operands for "+conditionFilterDataItem.getQueryObject()+" is "+operands.length);
                            System.out.println(filter.getID());
                            promptArr=filter.findPrompts();
                               for(int j=0;j<promptArr.length;j++)
                                    OMFilterPrompt prompt= promptArr[j];
                                    System.out.println(prompt.getDisplayName());
                                    String promptName=prompt.getDisplayName();
                                    Prompt currentPrompt = (Prompt)promptMap.get(promptName);
                                    if(operands[j]!=null)
                                    currentPrompt.enterValues(convertStringToArray(operands[j]));
                                    System.out.println("value set is ::"+operands[j]);
              doc.setPrompts();        
              //dp.runQuery ();
              doc.refresh();
        * Converts String to a string array.
        * @param values -
        *            string to be converted.
        * @return - String Array
       private static String[] convertStringToArray(String values) {
           StringTokenizer promptval = new StringTokenizer(values, "=");
           int loop = 0;
           int size = promptval.countTokens();
           String[] newArr = new String[size];
           while (promptval.hasMoreTokens()) {
               newArr[loop++] = new String(promptval.nextElement().toString()
                       .trim());
           return newArr;
    function to create map for prompts
      private static Map generateInstanceMap(DocumentInstance document)
            Map<String, Prompt> promptMap = new HashMap<String,Prompt>();
            Prompts prompts = document.getPrompts();
            int count;
            if(prompts!=null)
                 count= prompts.getCount();
                 for(int i=0;i<count;i++)
                      Prompt prompt= prompts.getItem(i);
                      promptMap.put(prompt.getName(),prompt);
            return promptMap;
    i first remove all filter conditions the create prompts and then sets values to these prompts.
    the values are set correctly to the report when viewed in Infoview but the values are not refreshed ; so i see a blank report.
    Can anyone help with a code snippet at the earliest.

    All replies so far have focused on solving multiple form issues. I have no problem with multiple forms per page but exactly like the original poster I can not get my h:commandLinks to work when embedded in a h:datatable.
    I have command buttons before and after the data table working great, but for whatever reason command links just do a post back to the backing bean.
    At this point I am not even trying to process data, just verify the action method is being executed.
    Another item of note, the links will always post to the same bean regardless of what bean is referenced in action="...."
    Any ideas?
    Message was edited by:
    jasontc
    It appears once the page is rendered for the first time any future rendering will display the link(s) but the link(s) will be junk.
    I ran a test with a pre populated ArrayList for my datatable, link worked. I then reload the datatable with a different ArrayList and the link is still referencing the original item in the list. So the action method I want to call is called but the .getRowData is incorrect. In addition of the number of items in my list grows the links become junk beyond the original size of the list.

  • Form button does not work when a program is moved from Windows 8.2 to Windows 7

    Hi,
    I have a few Excel programs which use the ODBC to get data from Access and which have macros which writes data to an external program, MYOB.
    When the macros tries to write the data to MYOB it fails if I am not running the program in administrator mode.   It seems that Windows 8.2 has a different level of security than Windows 7 and must be run in administrator mode for the ODBC to work. 
    I have had issues after running the program in administrator mode (testing) if I simply do a save (in administrator mode) and then send it to the customer.   The issue is that it just will not work on the customer's site.   I have gotten
    around this in the past by saving any changes, going back out of excel, loading the program again (not in administrator mode) and saving it - before sending it to the customer.   This worked until now.
    For some unknown reason, the last time I sent a program to the customer and carried out the above process, the program stopped working.   Originally I thought that the macro just wouldn't work on windows 7, but eventually found that it is the form button
    that will no longer work when the program is moved from 8.2 to 7.
    Does anyone know why there is an incompatibility between 8.2 and Windows 7 and what I should be doing to ensure that my programs work in my customers environment(windows7)?
    In the meanwhile, I have changed the form button to an activex button and the program works fine in both environments.
    Thanking you in advance,

    there is some OP report after Windows update Dec 2014 macro stop responding ( I cant confirm if this is also related to your issue) its because security update for Office maybe conflict with the active-x that you are installed
    try to
    Close Excel
    Start Windows Explorer.
    Select your system drive (usually C:)
    Use the Search box to search for *.exd
    Delete all the files it finds.
    Start Excel again
    Open that file and save it, and try open at Windows 7
    to get more detail about this issue, I suggest also contact Office forum
    this case also will be solve installing kb3025036
    good luck

  • Form Personalization is not working for copied Sales Orders

    Hi All,
    We have a requirement in Sales Order form, if the order type is "Standard" then Ship method field should be mandatory.
    We were able to do this using below form personalization, it is working for new order creation.
    When we did the below testing it is not working
    Inactivated the ship method and try to copy the order with Standard type the field remains mandatory and null but still it is allowing to book the Sales Order.
    Please help to sort out this issue, let me know if it is not clear
    Condition
    Trigger Event : WHEN-NEW-ITEM-INSTANCE
    Trigger Object: ORDER.SOLD_TO
    Condition:
    (:ORDER.ORDER_TYPE not like '%STANDARD%')
    Action
    Type : Property
    Object Type : Item
    Target Object : ORDER.SHIPPING_METHOD
    Property Name: REQUIRED
    Value: True
    Thanks,
    CSK

    Hi CSK,
    try it in well validate item trigger.
    If that order type is list then you may disable the field in WHEN LIST CHANGED  trigger itself.
    Hope it will work,
    Regards,
    Soofi

  • Adobe forms layout editor  not working

    Hello
    the layout editor in <b>sfp</b> transaction for adobe forms is not working... it says " could not open layout editor" .
    can anyone plz suggest whether anything needs to be installed while installing the gui or any patch would do ...
    or atleast where to find the patch ..
    thanks in advance !

    Hi,
    Actually, after a bit more checking I've found SAP note 962763 with more detail.
    You do need Adobe LiveCycle Designer and can download the installer from SAP Service
    Marketplace:
    http://service.sap.com/installations
    Entry by Application Group
    -> SAP NetWeaver
    -> SAP NETWEAVER
    -> SAP NETWEAVER 2004S
    -> Installation and Upgrade
    -> <Choose any OS and DB combination.>
    -> Adobe LiveCycle Designer 7.1
    Refer the links -
    Adobe interactive forms tutorial
    adobe forms
    Adobe Forms
    Regards,
    Omkar.

  • I am attempting to upload multiple photos on a macpro from a cd.  I am used to a pc.  I tried using the command button to select multiples but it does not work.  Please advise

    I am attempting to upload multiple photos on a mac pro from a cd.  I have tried holding the "command"button down to select multiple photos but it does not work.  Please advise.  Thanks,John

    why not sort by (name, date, etc) and Click on 1st and Shift-Click on last.
    Might work better to copy or import to a project folder.
    https://discussions.apple.com/community/ilife/iphoto
    http://www.apple.com/support/iphoto

  • InfoButton PJC   Demos for Forms (tooltip buttons) - not working

    Hello everybody,
    I am new to using PJC and JavaBeans in forms. I have on my laptop Oracle Developer Suite 10g (10.1.2.0.1) and Forms Demos version 9.0.4.2.0 I downloaded from OTN. I studied InfoButton PJC application (buttons that show tool-tips at mouse-over).
    Now, I want to create in one of my old forms such a button. I followed exactly the steps of the demo, that is:
    1. I created a form with a button TEST_BUTTON for which I set the Implementation Class property to oracle.forms.demos.enhancedItems.InfoButton.
    2. On the form's canvas I also created a text item named INFO with the following properties:
    X Position = 255
    Y Position = 107
    Width = 100
    Height = 100
    3. At form level, I created the trigger WHEN-NEW-FORM-INSTANCE in order to set the button's properties as follows:
    SET_CUSTOM_PROPERTY('CONTROL.TEST_BUTTON',1,'INFOBUTTON_TEXT','This is the tooltip text');
    SET_CUSTOM_PROPERTY('CONTROL.TEST_BUTTON',1,'INFOBUTTON_FIELDPOS','288,128');
    4. I created in my formsweb.cfg file a configuration section for my form.
    [pjc_demos_dana]
    pageTitle=OracleAS Forms Services - InfoButton Demo Dana
    IE=jinitiator
    baseHTMLJInitiator=demobasejini.html
    archive_jini=frmall_jinit.jar,/forms/formsdemo/jars/infobutton.jar
    form=pjclaunch_dana.fmx
    width=675
    height=480
    separateFrame=false
    splashScreen=no
    lookAndFeel=oracle
    colorScheme=blue
    background=/formsdemo/images/blue.gif
    When executing the form, the button has round margins as said in the documentation; at mouse over the cursor takes the form of a small hand but there is no tool tip. I receive no errors, only that it doesn't show the tool tip.
    I don't understand why it's not working, what I did wrong ...
    When setting the 'INFOBUTTON_FIELDPOS' property - input parameter X,Y - the documentation says: "This property should be set to a string containing a X,Y comma separated pair providing the location of the target field in pixels relative to the top left hand corner of the window. The X,Y pair simply has to define a point anywhere within the target field, it doesn't have to exactly define the corner".
    What is the target field? The text item I created at step 2)? The documentation is not clear here ...
    Any help will be appreciated.
    Daniela

    Dear Safwan Bhai,
    As salaamo alaikum Rahamatulla hi burakathu!!
    Actually I'm having a multi record block in which all the emp no., days of attendance, etc will be displayed when I click on the search button. My requirement is when point the mouse over the emp no, the emp name must be displayed as a Tool tip text. My fields are non-editable, so Post-Change is not working. I placed the coding in the When-new-item-instance - in this case the emp name is displayed, but only for the first field, when I move the mouse to second and third fields, the empname of that particulart field is displayed as a tool tip but in the first field only.
    Any other suggestions?
    Anyway I would appreciate your help.
    Thank you.
    With Kind Regards,
    Perumal Senthil Alagu.

  • Infopath form people picker not working in outlook 2010

    Hi,
    I have created custom task form which has reassign feature. If the form is opened in IE, people editor control is working but in outlook account names are not resolved and dictionary also not working. There should be some work around as OOTB  approval
    task form could able to do it.
    So, Question is, why people picker is not working in Outlook? and how to make it work? If I store user profile in InfoPath form, people editor in outlook is working. but how to make a dynamic soap connection ?
    Thanks.

    Don't mark your own post as an answer when you obviously didn't understand the question...
    Dharnima mentioned it is working in IE but not working in Outlook, so it's obviously not because the
    "Requested By" field is in read only otherwise it wouldn't work in IE either.
    Like Navid.R mentionned, the problem is indeed when going through the "Reassign Task" button, but coming from Outlook.
    I have the same problem where the people picker validator and the people directory button doesn't work, only when coming from Outlook. I do click on Reassign Task, but I am unable to valide or open the people directory with both people picker buttons, simply
    nothing happens.
    I tried adding a native SharePoint Approval workflow to my list, and this one works fine. I can click the "Open Task" button in Outlook, click "Reassign Task" and then the people picker works perfectly fine.
    However my custom workflow (that has default forms) does not work when prompted from Outlook.
    I even tried to delete both forms and republish my workflow, so SharePoint can regenerate the forms by itself, it did generate new forms, but no luck either.

  • Copy Settings to multiple images - STILL A NOT WORKING AFTER MANY VERSIONS!

    I have reported the problem of pasting settings to multiple images for many versions and this simple bug is STILL present in LR4!
    In develop module, make changes to an image, click Copy button, select settings to copy.
    Now, select a range or a number of images to which you want to paste the settings, click Paste button.  Guess what?  Only the first image gets the settings!
    This functionality should work and is even documented in the manual.  There are other ways of copying settings but I can never remember how to do this.
    Am I doing something wrong or is this a genuine bug that only seems to affect a few people (I did a web search for V3), or do people just not use this function?
    Please developers, fix this bug if it really is a bug!

    Thanks Dorin for the information.
    I guess I am just frustrated that the program does not work the way it is documented.  There are two very prominent buttons, Copy & Paste and they don't work as documented or as you would expect them to.
    With sync you have to navigate menus to do what one click of the mouse should accomplish.  All I want is some acknowledgement from Adobe that this is a bug and for it to be adressed.  As a long-time IT person I know this would be VERY easy to fix.  If it cannot be fixed then update the documentation.
    Oh well, enough said.  I still love LR!!!

  • PHP email form with Validation - not working

    Hello;
    I am new to using php. I usually use coldfusion or asp but this site requires me to write in php. I have a form I am trying to get to work and right now.. it doesn't do anyhting but remember what you put in the fields. It doesn't want to send, and it won't execute the validation script for the fields that are required. Can anyone help me make this work? I'm confused and a definate newbie to PHP.
    Here is my code:
    <?php    
                  $PHP_SELF = $_SERVER['PHP_SELF'];   
                  $errName    = "";   
                  $errEmail    = "";
                  $errPhone    = "";        
                  if(isset($_POST['submit'])) {        
                          if($_POST["ac"]=="login"){            
                        $FORMOK = TRUE;    // $FORMOK acts as a flag. If you enter any of the conditionals below,                             // it gets set to FALSE, and the e-mail will not be sent.
                        // First Name           
                        if(preg_match("/^[a-zA-Z -]+$/", $_POST["name"]) === 0) {               
                            $errName = '<div class="errtext">Please enter you name.</div>';               
                            $FORMOK = FALSE;           
                        // Email           
                    if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $_POST["email"]) === 0) {                                                    $errEmail = '<div class="errtext">Please enter a valid email.</div>';               
                            $FORMOK = FALSE;           
                        // Phone           
                        if(preg_match("/^[a-zA-Z -]+$/", $_POST["phone"]) === 0) {               
                            $errPhone = '<div class="errtext">Please enter your phone number.</div>';               
                            $FORMOK = FALSE;           
                        if($FORMOK) {               
                                $to = "[email protected]";  
                                $subject = "my. - Contact Form";                  
                                $name_field = $_POST['name'];               
                                $email_field = $_POST['email'];               
                                $phone_field = $_POST['phone'];
                                $city_field = $_POST['city'];
                                $state_field = $_POST['state'];               
                                $message = $_POST['comment'];                
                                $message = "               
                                Name: $name_field               
                                Email: $email_field
                                Phone: $phone_field   
                                City: $city_field   
                                State: $state_field               
                                Message: $message";                
                                $headers  = 'MIME-Version: 1.0' . "\r\n";               
                                $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";                
                                // Additional headers               
                                $headers .= 'To: <[email protected]>' . "\r\n";               
                                $headers .= '[From] <$email_field>' . "\r\n";                
                                // Mail it               
                                mail($to, $subject, $message, $headers);                
                                header("Location: thankyou.php")
                                // I have no idea what these next 3 lines are for. You may just want to get rid of them.                   
    ini_set("sendmail_from","[Send from]");
    ini_set("SMTP","[mail server]");
    mail($to, $subject, $message, $headers);
                                } else {               
                                echo "Error!";              
                        ?>
    <form method="post" action="<?php $PHP_SELF ?>" id="commentForm">
    <input name="name" size="40" value="<?php echo $_POST["name"]; ?>" type="text">
                         <?php  if(isset($errName)) echo $errName; ?>
    <input name="email" size="40" value="<?php echo $_POST["email"]; ?>"  type="text">
            <?php  if(isset($errEmail)) echo $errEmail; ?>
    <input name="phone" size="40" value="<?php echo $_POST["phone"]; ?>" type="text" id="phone">
            <?php  if(isset($errPhone)) echo $errPhone; ?>
    <input name="city" size="40" value="<?php echo $_POST["city"]; ?>" type="text" id="city">
    <input name="state" size="40" value="<?php echo $_POST["state"]; ?>" type="text" id="state">
    <textarea name="comment" cols="30" rows="10" id="comment"><?php echo $_POST["comment"]; ?></textarea>
    <input type="submit" value="Submit" name="submit" class="contact-submit" />
    </form>
    It seems pretty simple.. but it's not working at all. I would also like this page to submit to it's self, and when it actually does send an email, to just make the form disappear and replace it with the thank you text instead of sending you to another page. I also do not need to use an smtp server, it goes directly to the network server when sent.
    I'm really sorry to ask all of this, I'm trying to learn this language and need to make this work.
    Thank you for anyones help in advance.

    .oO(BarryGBrown)
    > I have a php file which generates an email from a form
    in a website I have
    >designed. I just want to make some areas of the final
    generated email in bold
    >text. I know if people have plain text only selected in
    their email client they
    >won't see the bold text, but at least it will reach a
    certain percentage of
    >users.
    You can't do bold text in a normal email. Plain text is just
    that -
    plain text. For anything more you need HTML. _If_ you should
    need it.
    Usually plain text serves pretty well and is the most
    efficient way.
    > the line in question is -
    >
    > $body ="Booking request details from website:\n\n";
    >
    > I have tried putting  and ,
    syntax is used in some forum software, but besides that it
    has
    no meaning whatsoever.
    >inside the inverted commas, outside
    >etc, plus tried different declarations within the
    <head>, nothing works! What
    >am I doing wrong?
    You would have to create an entire HTML email with all the
    required
    headers and boundaries. Quite difficult to do by hand with
    PHP's mail()
    function.
    > I am a beginner with this php stuff, please be kind!
    Then you should start simple with plain text. There are some
    classes out
    there which make it easy to generate text and HTML emails
    (phpmailer for
    example), but you should be familiar with PHP coding if you
    want to use
    them.
    Micha

Maybe you are looking for

  • How to create logical columns for current period and prior period

    Hello all. Is there any way in obiee to create a new logica column in BMM layer that says "CURRENT PERIOD" AND "PRIOR PERIOD" OR ONE SINGLE COLUMN THAT SAYS "PERIOD". In those columns what I need is if it a current period column it shoould have 03/01

  • R12 XML Publisher reports shows output but with warning

    R12 XML Publisher reports shows correct output in both PDF and EXCEL but with warning, this is making the business uneasy, can any one help me with this. Please advise?

  • Only G/L accounts can be entered on the fast entry screen

    We are currently upgrading our SAP environment from version 4.70 to ECC 6.0.  Our users are testing their Parked Document fast entry screen entries created through F-65 and when they attempt to "view" their entry on the Fast Entry screen, after enter

  • I can't access a specific site..HELP

    Hello everyone, I'm having an issue with one particular website. It's a torrent site which i check almost daily and wasn't having any problems until this week. The site www.gay-torrents.net is giving me the issues. Now I can go to another persons hom

  • Publish Services have disappeared.

    All of my Pubish Services quit displaying in Library Module.  They show  correctly in Publishing Manager.  I'm not sure what to look for to fix.   I tried reinstalling LR3.2 and then installed 3.3 RC, but no change.   Any one have an idea??