Detect form validation error

Hi there,
I have a page that displays a report and a form on the same page.
The user clicks on a row in the report - triggering a re-submit - and the form fills with the correct details.
On the report there's a NEW button to add a new row.
When clicked the form is emptied and ready for filling in.
On the form there's a CREATE button to accept the entry and create the row (using a custom After Submit process).
I use Before Header processes to set the details in the form depending on the row clicked or a particular REQUEST from a button.
I also enable/disable button depending on the REQUEST (in add mode the CREATE button is shown - otherwise the APPLY button).
So far so good.
Now i have some validations on the form and when one of them fails it re-writes the screen with the inline error messages shown however the REQUEST is then empty!
This causes problems for me when pre-setting the form with data and enabling/disabling buttons.
Is it possible to detect somehow if a field validation error has occured or set the REQUEST with a particular value?
Because of the REQUEST reset after an error my CREATE button gets disabled and my APPLY button re-appears causing confusion for the user (and me :-) ).
I hope I'm making myself clear here.
Ruud

The problem is not how to set the items & buttons.
My buttons are conditionally shown by looking at the REQUEST value.
My problem is more with the logic of detecting an error on my screen.
I need something like following pseudo-code:-
IF :REQUEST = 'ADD_ROW' THEN -- Insert mode (invoked by pressing button NEW on the report)
  clear form
  disable button APPLY in the form
  enable button CREATE in te form
ELSE
  IF form shows an inline validation error THEN -- Error mode
    -- do nothing to change the values on the form
    -- do nothing to change existing enabled/disabled buttons
    -- Basically allow the user to correct mistakes and continue
    NULL;
  ELSE -- Normal update mode
    fill form with details of selected row
    enable APPLY button
    disable CREATE button
  END IF;
END IF;It's the "form shows an inline validation error" bit that I have problems with.
How do I know an error is shown on the screen?
Is there an application item that tells me this?
Perhaps I could set a page or app item myself in the validation code to flag that an error occurred?
Ruud

Similar Messages

  • Form validation error when the Table is empty.

    Hello Gurus,
    I am getting form validation error as soon as the popup is rendered to submit new row.
    I am using the this popup to add new row in the table and this is happening only when there no data in the table but it works fine when there is some data in the table.
    Screen shot: [http://picpaste.com/adf_error-BAdP8Thv.JPG]
    Is there any way can I defer this error till I submit the form. ( which works fine when there is some data in table )
    Thanks
    Abhijeet

    here i tested not happend for me.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" binding="#{backingBeanScope.backing_untitled8.d1}">
          <af:form binding="#{backingBeanScope.backing_untitled8.f2}" id="f2">
            <af:messages binding="#{backingBeanScope.backing_untitled8.m1}"
                         id="m1"/>
            <af:popup binding="#{backingBeanScope.backing_untitled8.p1}" id="p1">
              <af:dialog binding="#{backingBeanScope.backing_untitled8.d3}" id="d3">
                <af:panelFormLayout binding="#{backingBeanScope.backing_untitled8.pfl1}"
                                    id="pfl1">
                  <af:inputText value="#{bindings.AunitctrlBe.inputValue}"
                                label="#{bindings.AunitctrlBe.hints.label}"
                                required="#{bindings.AunitctrlBe.hints.mandatory}"
                                columns="#{bindings.AunitctrlBe.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlBe.hints.precision}"
                                shortDesc="#{bindings.AunitctrlBe.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it10}"
                                id="it10">
                    <f:validator binding="#{bindings.AunitctrlBe.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlUnit.inputValue}"
                                label="#{bindings.AunitctrlUnit.hints.label}"
                                required="#{bindings.AunitctrlUnit.hints.mandatory}"
                                columns="#{bindings.AunitctrlUnit.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlUnit.hints.precision}"
                                shortDesc="#{bindings.AunitctrlUnit.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it11}"
                                id="it11">
                    <f:validator binding="#{bindings.AunitctrlUnit.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCostMethod.inputValue}"
                                label="#{bindings.AunitctrlCostMethod.hints.label}"
                                required="#{bindings.AunitctrlCostMethod.hints.mandatory}"
                                columns="#{bindings.AunitctrlCostMethod.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCostMethod.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCostMethod.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it12}"
                                id="it12">
                    <f:validator binding="#{bindings.AunitctrlCostMethod.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCostMgmtOpt.inputValue}"
                                label="#{bindings.AunitctrlCostMgmtOpt.hints.label}"
                                required="#{bindings.AunitctrlCostMgmtOpt.hints.mandatory}"
                                columns="#{bindings.AunitctrlCostMgmtOpt.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCostMgmtOpt.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCostMgmtOpt.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it13}"
                                id="it13">
                    <f:validator binding="#{bindings.AunitctrlCostMgmtOpt.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCostApprMtd.inputValue}"
                                label="#{bindings.AunitctrlCostApprMtd.hints.label}"
                                required="#{bindings.AunitctrlCostApprMtd.hints.mandatory}"
                                columns="#{bindings.AunitctrlCostApprMtd.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCostApprMtd.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCostApprMtd.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it14}"
                                id="it14">
                    <f:validator binding="#{bindings.AunitctrlCostApprMtd.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlJocApprMtd.inputValue}"
                                label="#{bindings.AunitctrlJocApprMtd.hints.label}"
                                required="#{bindings.AunitctrlJocApprMtd.hints.mandatory}"
                                columns="#{bindings.AunitctrlJocApprMtd.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlJocApprMtd.hints.precision}"
                                shortDesc="#{bindings.AunitctrlJocApprMtd.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it15}"
                                id="it15">
                    <f:validator binding="#{bindings.AunitctrlJocApprMtd.validator}"/>
                  </af:inputText>
                  <af:inputText value="#{bindings.AunitctrlCreBy.inputValue}"
                                label="#{bindings.AunitctrlCreBy.hints.label}"
                                required="#{bindings.AunitctrlCreBy.hints.mandatory}"
                                columns="#{bindings.AunitctrlCreBy.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlCreBy.hints.precision}"
                                shortDesc="#{bindings.AunitctrlCreBy.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it16}"
                                id="it16">
                    <f:validator binding="#{bindings.AunitctrlCreBy.validator}"/>
                  </af:inputText>
                  <af:inputDate value="#{bindings.AunitctrlCreDate.inputValue}"
                                label="#{bindings.AunitctrlCreDate.hints.label}"
                                required="#{bindings.AunitctrlCreDate.hints.mandatory}"
                                shortDesc="#{bindings.AunitctrlCreDate.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.id1}"
                                id="id1">
                    <f:validator binding="#{bindings.AunitctrlCreDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.AunitctrlCreDate.format}"/>
                  </af:inputDate>
                  <af:inputText value="#{bindings.AunitctrlUpdBy.inputValue}"
                                label="#{bindings.AunitctrlUpdBy.hints.label}"
                                required="#{bindings.AunitctrlUpdBy.hints.mandatory}"
                                columns="#{bindings.AunitctrlUpdBy.hints.displayWidth}"
                                maximumLength="#{bindings.AunitctrlUpdBy.hints.precision}"
                                shortDesc="#{bindings.AunitctrlUpdBy.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it17}"
                                id="it17">
                    <f:validator binding="#{bindings.AunitctrlUpdBy.validator}"/>
                  </af:inputText>
                  <af:inputDate value="#{bindings.AunitctrlUpdDate.inputValue}"
                                label="#{bindings.AunitctrlUpdDate.hints.label}"
                                required="#{bindings.AunitctrlUpdDate.hints.mandatory}"
                                shortDesc="#{bindings.AunitctrlUpdDate.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.id2}"
                                id="id2">
                    <f:validator binding="#{bindings.AunitctrlUpdDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.AunitctrlUpdDate.format}"/>
                  </af:inputDate>
                  <af:inputText value="#{bindings.RowID.inputValue}"
                                label="#{bindings.RowID.hints.label}"
                                required="#{bindings.RowID.hints.mandatory}"
                                columns="#{bindings.RowID.hints.displayWidth}"
                                maximumLength="#{bindings.RowID.hints.precision}"
                                shortDesc="#{bindings.RowID.hints.tooltip}"
                                binding="#{backingBeanScope.backing_untitled8.it18}"
                                id="it18">
                    <f:validator binding="#{bindings.RowID.validator}"/>
                  </af:inputText>
                  <f:facet name="footer">
                    <af:panelGroupLayout layout="vertical"
                                         binding="#{backingBeanScope.backing_untitled8.pgl1}"
                                         id="pgl1">
                      <af:panelGroupLayout layout="horizontal"
                                           binding="#{backingBeanScope.backing_untitled8.pgl2}"
                                           id="pgl2">
                        <af:commandButton actionListener="#{bindings.First1.execute}"
                                          text="First1"
                                          disabled="#{!bindings.First1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb1}"
                                          id="cb1"/>
                        <af:commandButton actionListener="#{bindings.Previous1.execute}"
                                          text="Previous1"
                                          disabled="#{!bindings.Previous1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb3}"
                                          id="cb3"/>
                        <af:commandButton actionListener="#{bindings.Next1.execute}"
                                          text="Next1"
                                          disabled="#{!bindings.Next1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb4}"
                                          id="cb4"/>
                        <af:commandButton actionListener="#{bindings.Last1.execute}"
                                          text="Last1"
                                          disabled="#{!bindings.Last1.enabled}"
                                          partialSubmit="true"
                                          binding="#{backingBeanScope.backing_untitled8.cb5}"
                                          id="cb5"/>
                      </af:panelGroupLayout>
                      <af:commandButton text="Submit"
                                        binding="#{backingBeanScope.backing_untitled8.cb6}"
                                        id="cb6"/>
                    </af:panelGroupLayout>
                  </f:facet>
                </af:panelFormLayout>
              </af:dialog>
            </af:popup>
            <af:panelCollection binding="#{backingBeanScope.backing_untitled8.pc2}"
                                id="pc2">
              <f:facet name="menus"/>
              <f:facet name="toolbar">
                <af:toolbar binding="#{backingBeanScope.backing_untitled8.t3}"
                            id="t3">
                  <af:commandButton text="insert"
                                    binding="#{backingBeanScope.backing_untitled8.cb7}"
                                    id="cb7"
                                    action="#{backingBeanScope.backing_untitled8.cb7_action}"
                                    partialSubmit="true"/>
                </af:toolbar>
              </f:facet>
              <f:facet name="statusbar"/>
              <af:table value="#{bindings.ApplUnitControlView1.collectionModel}"
                        var="row" rows="#{bindings.ApplUnitControlView1.rangeSize}"
                        emptyText="#{bindings.ApplUnitControlView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.ApplUnitControlView1.rangeSize}"
                        rowBandingInterval="0"
                        filterModel="#{bindings.ApplUnitControlView1Query.queryDescriptor}"
                        queryListener="#{bindings.ApplUnitControlView1Query.processQuery}"
                        filterVisible="true" varStatus="vs"
                        selectedRowKeys="#{bindings.ApplUnitControlView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.ApplUnitControlView1.collectionModel.makeCurrent}"
                        rowSelection="single"
                        binding="#{backingBeanScope.backing_untitled8.t4}" id="t4"
                        partialTriggers=":::cb1 :::cb3 :::cb4 :::cb5 ::cb2">
                <af:column sortProperty="AunitctrlBe" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.label}"
                           id="c6" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlBe.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlBe.tooltip}"
                                id="it1">
                    <f:validator binding="#{row.bindings.AunitctrlBe.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlUnit" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.label}"
                           id="c3" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlUnit.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlUnit.tooltip}"
                                id="it9">
                    <f:validator binding="#{row.bindings.AunitctrlUnit.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCostMethod" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.label}"
                           id="c9" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCostMethod.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMethod.tooltip}"
                                id="it6">
                    <f:validator binding="#{row.bindings.AunitctrlCostMethod.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCostMgmtOpt" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.label}"
                           id="c1" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCostMgmtOpt.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCostMgmtOpt.tooltip}"
                                id="it3">
                    <f:validator binding="#{row.bindings.AunitctrlCostMgmtOpt.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCostApprMtd" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.label}"
                           id="c2" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCostApprMtd.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCostApprMtd.tooltip}"
                                id="it2">
                    <f:validator binding="#{row.bindings.AunitctrlCostApprMtd.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlJocApprMtd" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.label}"
                           id="c4" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlJocApprMtd.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlJocApprMtd.tooltip}"
                                id="it4">
                    <f:validator binding="#{row.bindings.AunitctrlJocApprMtd.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCreBy" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.label}"
                           id="c5" width="105">
                  <af:inputText value="#{row.bindings.AunitctrlCreBy.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCreBy.tooltip}"
                                id="it7">
                    <f:validator binding="#{row.bindings.AunitctrlCreBy.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlCreDate" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.label}"
                           id="c8" width="103">
                  <f:facet name="filter">
                    <af:inputDate value="#{vs.filterCriteria.AunitctrlCreDate}"
                                  binding="#{backingBeanScope.backing_untitled8.id5}"
                                  id="id5"/>
                  </f:facet>
                  <af:inputDate value="#{row.bindings.AunitctrlCreDate.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.mandatory}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.tooltip}"
                                id="id3">
                    <f:validator binding="#{row.bindings.AunitctrlCreDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.ApplUnitControlView1.hints.AunitctrlCreDate.format}"/>
                  </af:inputDate>
                </af:column>
                <af:column sortProperty="AunitctrlUpdBy" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.label}"
                           id="c7" width="107">
                  <af:inputText value="#{row.bindings.AunitctrlUpdBy.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdBy.tooltip}"
                                id="it5">
                    <f:validator binding="#{row.bindings.AunitctrlUpdBy.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="AunitctrlUpdDate" filterable="true"
                           sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.label}"
                           id="c10" width="105">
                  <f:facet name="filter">
                    <af:inputDate value="#{vs.filterCriteria.AunitctrlUpdDate}"
                                  binding="#{backingBeanScope.backing_untitled8.id6}"
                                  id="id6"/>
                  </f:facet>
                  <af:inputDate value="#{row.bindings.AunitctrlUpdDate.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.label}"
                                required="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.mandatory}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.tooltip}"
                                id="id4">
                    <f:validator binding="#{row.bindings.AunitctrlUpdDate.validator}"/>
                    <af:convertDateTime pattern="#{bindings.ApplUnitControlView1.hints.AunitctrlUpdDate.format}"/>
                  </af:inputDate>
                </af:column>
                <af:column sortProperty="RowID" filterable="true" sortable="true"
                           headerText="#{bindings.ApplUnitControlView1.hints.RowID.label}"
                           id="c11" width="105">
                  <af:inputText value="#{row.bindings.RowID.inputValue}"
                                label="#{bindings.ApplUnitControlView1.hints.RowID.label}"
                                required="#{bindings.ApplUnitControlView1.hints.RowID.mandatory}"
                                columns="#{bindings.ApplUnitControlView1.hints.RowID.displayWidth}"
                                maximumLength="#{bindings.ApplUnitControlView1.hints.RowID.precision}"
                                shortDesc="#{bindings.ApplUnitControlView1.hints.RowID.tooltip}"
                                id="it8">
                    <f:validator binding="#{row.bindings.RowID.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
            </af:panelCollection>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_untitled8-->
    </jsp:root>
        public String cb7_action() {
            try {
                BindingContainer bindings1 = getBindings();
                DCIteratorBinding dciter = (DCIteratorBinding)bindings1.get("ApplUnitControlView1Iterator");
                Row oldCcurrentRow = dciter.getCurrentRow();
                BindingContainer bindings = getBindings();
                OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
                Object result = operationBinding.execute();
                if (!operationBinding.getErrors().isEmpty()) {
                    return null;
                RichPopup popup = this.getP1();
                RichPopup.PopupHints hints =
                    new RichPopup.PopupHints(); //empty hints renders dialog in center of screen
                popup.show(hints);
            catch (NullPointerException e)
                System.out.println(" cause " + e.getCause());
                System.out.println("message" + e.getLocalizedMessage());
                System.out.println("stack trace" + e.getStackTrace());
            return "insert";
        }Edited by: ADF 7 on Feb 10, 2012 2:05 AM

  • Form validation error with mandatory fields and signature field

    Hello,
    I have seen that many other users are facing this issue, and they partialy do solve it with some workarounds. However, none of them applies to my case.
    I have a dynamic form (can be registration form for example) where user fills in bunch of fields. Some of them are mandatory.
    When user signs the form, I get our favourite validation error popups that filed this and this did not validate. (I think that the signature is not valid too once I get these errors).
    Workaround would be to set all fileds in the form as optional, however, the presign and postsign events work only in A9 and I need the form to be compatible with ver. 8 too.
    I also need to make sure, that they are not set to optional, if the signing fails, user clicks on cancel etc...
    Any ideas how to acomplish such a scenario?
    Thanks
    J.

    solved by myself.
    You have to install and configure the reader rights credentials mentioned in note 736902

  • Form Validation - Error Trapping Not Working.

    Hi,
    I'm a Coldfusion beginner desperately trying to get along with some database work for my site and have come across an annoying error that I just can't solve! I'm sure I'm missing something really basic - I just can't for the life of me figure out what it is!
    Basically, I have a form for users to sign-up. I have introduced several cfif statements and a basic CAPTCHA system to trap errors. If any errors are submitted then they should be displayed in a cfwindow. This process works fine until I specify the form action - after which it is completely ignored and the form contents are written to the database without any validation taking place. Even without specifying the form action the errors won't show in Internet Explorer.
    I really would appreciate any help - it's driving me crazy!
    Thanks in advance,
    Tom.
    Here is the code:
    <cfinclude template="CFIDE/headertemplate.cfm">
    <!-- RANDOM NUMBER GENERATOR  FOR CAPTCHA -->
    <cffunction name="makerandom" returnType="string" output="false">
    <cfset var chars = "23456789ABCDEFGHJKMNPQRSTW">
    <cfset var length = randRange(4,6)>
    <cfset var result = "">
    <cfset var i = "">
    <cfset var char = "">
    <cfscript>
         for(i=1; i <= length; i++) {
              char = mid(chars, randRange(1, len(chars)),1);
              result&=char;
    </cfscript>
    <cfreturn result>
    </cffunction>
    <!-- ERROR TRAPPING -->
      <cfset showForm = true>
      <cfparam name="form.email" default="">
      <cfparam name="form.artistname" default="">
      <cfparam name="form.city" default="">
      <cfparam name="form.postcode" default="">
      <cfparam name="form.pass" default="">
      <cfparam name="form.captcha" default="">
      <cfparam name="form.captchahash" default="">
      <cfparam name="form.terms" default="">
    <cfif isDefined("form.send")>
          <cfset errors = "">
    <cfif len (form.email) LT '4'>
    <cfset errors = errors & "You must include a valid e-mail address.<br />">
    </cfif>
    <cfif find('.',form.email) is '0'>
    <cfset errors = errors & "Your E-mail features no . symbol.<br />">
    </cfif>
    <cfif find('@',form.email) is '0'>
    <cfset errors = errors & "Your E-mail features no @ symbol.<br />">
    </cfif>
    <cfif not len(trim(form.artistname))>
    <cfset errors = errors & "You must include your name.<br />">
    </cfif>
    <cfif not len(trim(form.city))>
    <cfset errors = errors & "You must include your city.<br />">
    </cfif>
    <cfif not len(trim(form.postcode))>
    <cfset errors = errors & "You must include your postcode.<br />">
    </cfif>
    <cfif not len(trim(form.pass))>
    <cfset errors = errors & "You must specify a password.<br />">
    </cfif>
    <cfif len(form.pass) LT '6'>
    <cfset errors = errors & "Password must be between 6 and 10 characters.<br />">
    </cfif>
    <cfif hash(ucase(form.captcha)) neq form.captchahash>
    <cfset errors = errors & "You did not enter the correct Captcha text.<br />">
    </cfif>
    <cfif not len(trim(form.terms))>
    <cfset errors = errors & "You must agree to our Terms and Conditions.<br />">
    </cfif>
    <cfif errors is "">
    <cfset showForm = false>
    </cfif>
    </cfif>
    <cfif showForm>
    <cfset captcha = makerandom()>
    <cfset captchahash = hash(captcha)>
    <cfoutput>
    <h1>Artist Sign-Up</h1>
    <p>Your details are required for sign-up. Mandatory fields are indicated with a *.</p><br/><br/>
    <cfif isDefined("errors")>
    <cfwindow name="formerrors"
    title="Form Errors"
    width="450"
    height="250"
    modal="true"
    initshow="true"
    center="true"
    closable="true"
    minheight="200"
    minwidth="200">
    <center><b>Please correct the following errors and re-submit the form:</b><br /><br/>#errors#
    <br/><a href="javascript:ColdFusion.Window.hide('formerrors');">Close Window</a>
    </center>
    <br/></cfwindow>
    </cfif>
    <!-- FORM CONTENTS -->
    <cfform action="artist_insert.cfm" method="post">
    <table class="signup">
    <tr>
    <td class="noborder" width="200">
      <label for="email">E-Mail Address*:</label>
    </td>
    <td class="noborder" width="156">
    <input type="text" name="email" class="textbox" value="<cfoutput><cfif IsDefined("URL.email")>#URL.email#<cfelse></cfif></cfoutput>"/>
    </td>
    <td class="noborder">
    <cftooltip autoDismissDelay="9999" tooltip="This needs to be a valid e-mail so that<br/> promoters can get in contact with you. <br/>If several people will be using this<br/> account then try and make it a shared<br/> address."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
    </td>
    </tr>
    <tr>
    <td class="noborder" width="200">
      Your Password* (6 to 10 chars.):
    </td>
    <td class="noborder">
    <input type="password" class="textbox" name="pass" maxlength="10"/>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder" >
    Artist/Band Name*:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="artistname" />
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    City*:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="city" />
    </td>
    <td class="noborder">
    <cftooltip autoDismissDelay="9999" tooltip="Entering your locational details enables Gig<br/>Digger to find the events and promoters<br/>in your area. Try specifying a well known<br/>city nearby for the best results."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
    </td>
    </tr>
    <tr>
    <td class="noborder">
    Postcode*:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="postcode" maxlength="8"/>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    Your Contact Number:
    </td>
    <td class="noborder">
    <input type="text" class="textbox" name="contact" maxlength="14"/>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <tr>
    <td class="noborder" valign="top" width="200">Please enter the CAPTCHA text in the box below*: </td>
    <td class="noborder" align="left">
    <center><cfimage action="captcha" width="156" height="50" text="#captcha#" border="1">
    <input type="hidden" name="captchaHash" value="#captchaHash#"></center>
    </td>
    <td class="noborder" valign="top">
    <cftooltip autoDismissDelay="9999" tooltip="This is here to ensure that<br/>you're human. It stops abuse <br/>of the site and makes it a safer <br/>place for us all."><img src="pics/i.jpg" alt="info" border="1" /></cftooltip>
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    <td class="noborder" align="right"><font size="-2"><b><a href="javascript:location.reload(false)">Refresh Page</a></b></font>
    </td>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder"></td>
    <td class="noborder"><input type="text" name="captcha" class="textbox"></td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder" width="170">Please check this box to confirm that you agree<br/> to our <b><a href="termsandconditions.cfm">Terms and Conditions</a></b>*.
    </td>
    <td class="noborder">
    <input type="checkbox" class="textbox" name="terms" /></td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    </tr>
    <tr>
    <td class="noborder">
    </td>
    <td class="noborder" align="center">
    <cfinput type="image" src="pics/submit.png" name="send" value="Submit" validate="submitonce" border="1">
    </td>
    </tr>
    </table>
    </cfform><br/>
    </cfoutput>
    <cfelse>
    <cfoutput>
    Thank you for submitting your details, #form.name#. You may now log in with your e-mail and password.
    </cfoutput>
    </cfif>
    </td>
    </tr>
    </table>
    <!-- FOOTER START -->
    </body>
    </html>
    ARTIST INSERT PAGE - artist_insert.cfm
    <cfquery datasource="071907cs07to">
    INSERT INTO Artist(    Nsudate,
                        Nemail,
                        Npass,
                        Nname,
                        Ncity,
                        Npostcode,
                        Ncnumber
    VALUES(    ( #Now()# ),
            '#Trim(form.email)#',
            '#Trim(form.pass)#',
            '#Trim(form.artistname)#',
            '#Trim(form.city)#',
            '#Trim(form.postcode)#',
            '#Trim(form.contact)#'
    </cfquery>

    In addition to BreakawayPaul's answer.
    You are making it very difficult to troubleshoot your if/else logic because your code includes all the display stuff.  Since you're a self proclaimed beginner, you might want to try another approach.
    Save your old page and start a new one from scratch.  Solve all your logic problems first.  Display what you need to see with the cfdump tag.
    Here are some hints to make the whole thing easier.
    1.  In your cfform, use the validate and required attributes to catch errors earlier.
    2. You don't have to cfparam every form field.  The form has either been submitted to it hasn't.  If it has, all the fields will be there with the possible exception of checkboxes or radio button, if nothing was selected.

  • Detecting validation errors

    Hi,
    how can I detect a validation error?
    For example, I'd like to show a generic message at the top of a page which says:
    "Some errors are detected, please check your data"
    This message is not bounded to a particular field, in fact I can use the <h:message for=""/> tags for showing the errors generated by each field.
    The only one solution I found is adding ugly code to my JSP:
    <% if (javax.faces.context.FacesContext.getCurrentInstance().getMessages().hasNext()) { %>
                  <span style="color: red;">Some errors are detected, please check your data</span>
                <%}The only one way to detect a validation error is cheking the message queue. If it's empty, no validation errors occured.
    I don't like it.
    Some help?

    I would like to share the kind of approach I had used with the same situation.
    You can put one "h:outputText" at the top of the page for displaying all the error messages.Obviously attach it to some backing bean property.
    Now whenever you encounter any error just assign your customize message to this bean propery.
    Whenever the response is rendered you can see your error message being displayed at the top of the page.
    Funny ! but it works !!!!

  • Invoke javascript on validation error?

    Is there any way to invoke some javascript when I get a form validation error?

    I'm having problems with dynamic menus. I was getting that "value is not valid" error because my menus don't identically match the arraylist I initially provide them with in the backing bean. So I decided to just get around it with javascript.
    Anyway I think I have found a solution using this as a guide:
    http://balusc.blogspot.com/2007/12/set-focus-in-jsf.html

  • Validation errors detected in form. when running a task

    Hi All,
    We are working on a large scale deployment that involves creating, modifying, deleting, etc. users utilizing ActiveSync processing in Sun IdM 7.1
    But for some reason, everytime we run a user through ActiveSync processing, we are receiving the following error message:
    com.waveset.exception.FormValidation: Validation errors detected in form.
    My guess is that either the ActiveSync form is corrupted or maybe the default user form.
    I have rolled back to prior versions of our custom ActiveSync form, but it has not solved the problem. I have checked the ActiveSync logs looking for a missing required field, but no errors show up there.
    I cant seem to find the form that this validation error is occuring on. I have tracing set up on level 4, and it doesnt seem to point me in the right direction.
    Any advise or experience with this error message would be greatly appreciated.
    Thanks

    I have the similar problem. Do you have solution yet?
    com.waveset.exception.FormValidation: Validation errors detected in form.
    +     at com.waveset.util.WavesetException.checkBreakpoint(WavesetException.java:366)+
    +     at com.waveset.util.WavesetException.<init>(WavesetException.java:85)+
    +     at com.waveset.exception.FormValidation.<init>(FormValidation.java:39)+
    +     at com.waveset.object.ViewMaster.runExpansions(ViewMaster.java:981)+
    +     at com.waveset.server.ViewMaster.runExpansions(ViewMaster.java:626)+
    +     at com.waveset.object.ViewMaster.runExpansions(ViewMaster.java:941)+
    +     at com.waveset.object.ViewMaster.checkinView(ViewMaster.java:723)+
    +     at com.waveset.session.LocalSession.checkinView(LocalSession.java:709)+
    +     at com.waveset.ui.util.GenericViewSource.checkinView(GenericViewSource.java:522)+
    +     at com.waveset.ui.util.GenericEditForm.process(GenericEditForm.java:593)+
    +     at com.ibm._jsp._wsibupdateprofile_5F_workItemEdit._jspService(_wsibupdateprofile_5F_workItemEdit.java:470)+
    +     at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)+
    +     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)+
    +     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1521)+
    +     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)+
    +     at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)+
    +     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:759)+
    +     at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)+
    +     at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:204)+
    +     at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:89)+
    +     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1924)+
    +     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:112)+
    +     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)+
    +     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)+
    +     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)+
    +     at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)+
    +     at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)+
    +     at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)+
    +     at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)+
    +     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)+

  • FormValidation: Validation errors detected in form.

    com.waveset.exception.FormValidation: Validation errors detected in form.
    getting above error, IDM 8.1.1.3(oracle Waveset).

    is that in reconcile from HR or other source of data? any way you have validation in the tabbedUserform which dont allow the update

  • Script for Form validator in head causes error

    When I use the Window/Behaveiors/ to create a form validator, Dreamweaver CS5 puts script in the Head of page, and seems to work ok. But when I validate page with W3c it says there are errors with code and as Dreamweaver created this I have no idea what to do to put right, so could someone please help. This is code generated by Dreamweaver, all other pages have past with flying colors!
    <script type="text/javascript">
    function MM_validateForm() { //v4.0
      if (document.getElementById){
        var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
        for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
          if (val) { nm=val.name; if ((val=val.value)!="") {
            if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
              if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
            } else if (test!='R') { num = parseFloat(val);
              if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
              if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
                min=test.substring(8,p); max=test.substring(p+1);
                if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
          } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
        } if (errors) alert('The following error(s) occurred:\n'+errors);
        document.MM_returnValue = (errors == '');
    </script>

    If the script is working fine in all browsers, you could put it in an external JS file and link to it, then the W3C validator won't find an error.
    If you don't know already, learn about how to do this:
    http://www.hypergurl.com/jsfiles.html

  • Losing data on a tabular form when submitting a page with validation errors

    I have a window that has a regular HTML form at the top that has several items. Then on the bottom of the page, I have a tabular form where the user can enter multiple rows of information. Unfortunately, when the page is submitted, if there are any validation errors, any changes that were made in the tabular form are lost.
    Any suggestions

    Fair enough :)
    Actually what I was meaning was could I use a collection to repopulate the tabular form when I receive errors. It appears as if it may work. However, I am hitting one snag.
    I have created a PL/SQL Process that runs On Submit and Before Computations/Validations. In this process, I have saving the values in the tabular form to a collection.
    I was then hoping to create another process that ran after any errors occur. However, it does not appear as if any processes run when the screen redraws after a validation issue. Is there a process that runs after validations when the screen is redrawing? Will I need to do this using javascript?
    Thanks

  • Unable to open SharePoint 2010 task from any Microsoft Office application - cannot open a new form (schema validation errors)

    I can’t get the Microsoft Office SharePoint Task integration to work with any SharePoint 2010 Workflows.  When any end user clicks the “Open this task…”
    button from outlook (or any other office application) a warning dialog appears stating that:
    “Outlook cannot open a new.
    The form contains schema validation errors.”
    The error details are:
    Element '{http://www.w3.org/1999/xhtml}div' is unexpected according to content model of parent element '{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body'.
    Some points to note:
    I can replicate this using on several computers running as different users. 
    I have full control over the site and the task I am trying to open. 
    When I navigate via the SharePoint site I can open the task. 
    The Info Path form that cannot be opened was automatically created by automatically SharePoint designer / InfoPath.  I have subsequently deleted the form and published
    the workflow (which created the InfoPath form again). 
    I am running Mircosoft Office Professional Plus 2010 version 14.0.5128.5000 (32-bit)
    One workaround is to remove the “Open this task…” button as per
    http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/eb273ee9-6a4b-409c-8eb0-5351bb113386/. This is not ideal and will be my last resort.
    Any suggestions and or thoughts appreciated.
    Thanks!

    Yes, I tried that.  It did not work for me.
    I have 4 site collections.  The main site collection is the only one that I receive the error.  
    When the user clicks on the email link  and opens the document for approval, they receive the following error when they click on "Open This Task". 
    Element '{http://www.w3.org/1999/xhtml}a is unexpected according to content model of
    parent element '{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body'.
    There is nothing wrong with the task list itself, just the link from the Office 2010 client. 
    I am wondering if there is a web config or other file on the server that is specific to the site collection??
    Tracey

  • XML Forms Combobox entries are disappearing after validation error

    In my XMLForm I have a combobox which is filled with items from a property. After submitting the form (when saving) with a validation error (e.g. date invalid) the entires in the combobox disappear and the entry can be saved without an entry (can this be permitted?).
    Also, when opening the saved entry, the combobox is also empty. I think this is a (unpatched?) KM/XMLForms bug, but maybe there a patch or an other solution for this?
    Is it possible the fill the combobox with fixed entries (without using the property)

    ok, fixed it with the following :
    <ice:selectOneMenu id="chosenSystem" value="#{userRoles.selectedSystem}"
                       valueChangeListener="#{userRoles.systemValueChanged}"
                       immediate="true" partialSubmit="true" required="true"
                       requiredMessage="#{fv_msg.ursysmandatory}" >
        <f:selectItem itemLabel="Choisissez un truc" itemValue=""/>
        <f:selectItems value="#{userRoles.remoteSystemItems}"/>                    
    </ice:selectOneMenu>
    <ice:selectOneMenu id="chosenAbstraction" value="#{userRoles.userRole.abstraction}"
                       converter="remoteAbstractionConverter" >
        <f:selectItem itemLabel="Choisissez un truc" itemValue=""/>
        <f:selectItems binding="#{userRoles.remoteAbstractionsHtml}"/>
    </ice:selectOneMenu>The valuechangelistener simply updates the binded component in chosenabstraction.
    Any idea on how to do that with ajax?
    Edited by: hereps on Aug 21, 2010 2:16 AM

  • Printing user validation errors from .php file back onto a form

    Hey all. I have written a simple contact form with the extention .php. It includes the php validation and the form inputs on one page. If the input does not validate, a warning in red is printed at the top of the form after the user pushes submit. When I cut and paste the php validation code into a seperate file, the validation errors print on a blank screen. What I want is to have the same results with a seperate php file as I do when I include the php code on the form. (print errors from the seperate php validation file back onto the form).  Thanks for taking a look
    <h1><span class="bodyheader1">Contact </span><span class="bodyheader2">Us</span></h1>
        <p class="subheading">Tell us what's on your mind:</p>
        <?php
        if(isset($_POST['send_comment']))
            //Validating the comment field
            //checking if a first_name field has been entered
            if($_POST['first_name'] != "")
                //Saitizing first_name with a filter
                $_POST['first_name'] = filter_var($_POST['first_name'], FILTER_SANITIZE_STRING);
                //Checking for no input
                if($_POST['first_name'] == "")
                    //If no input, return error message
                    $errors .='Please enter a valid first name.<br/>';
            else
                //Error message
                $errors .='Please enter your first name.<br/>';
            //Validating the last_name field
            //checking if last_name has been entered
            if($_POST['last_name'] != "")
                //Saitizing last_name with a filter
                $_POST['last_name'] = filter_var($_POST['last_name'], FILTER_SANITIZE_STRING);
                //Checking for no input
                if($_POST['last_name'] == "")
                    //If no input, return error message
                    $errors .='Please enter a valid last name.<br/>';
            else
                //Error message
                $errors .='Please enter your last name.<br/>';
            if($_POST['email'] != "")
                $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);
                if (!filter_var($email, FILTER_VALIDATE_EMAIL))
                    $errors .= "$email is not a valid email address.<br/>";
            else
                $errors .= 'Please enter your email address.<br/>';
            //Validating the comment field
            //checking if a comment has been entered
            if($_POST['comment'] != "")
                //Saitizing comment with a filter
                $_POST['comment'] = filter_var($_POST['comment'], FILTER_SANITIZE_STRING);
                //Checking for no input
                if($_POST['comment'] == "")
                    //If no input, return error message
                    $errors .='Please enter a comment.<br/>';
            else
                //Error message
                $errors .='Please enter a comment.<br/>';
            if(!$errors)
                $mail_to = '[email protected]';
                $subject = 'Contact form ' . $_POST['first_name'];
                $message = 'First Name: ' . $_POST['first_name'] . "\n";
                $message .= 'Last Name: ' . $_POST['last_name'] . "\n";
                $message .= 'Email: ' . $_POST['email'] . "\n";
                $message .= 'Comment: ' . $_POST['comment'] . "\n\n";
                mail($mail_to, $subject, $message);
                echo "<script>document.location.href='thankyou.html'</script>";
            else
                echo '<div style="color: red">' . $errors . '<br/></div>';
    ?>
    *All fields are required<br />
    <br />
        <form name="contact" method="post" action="contact.php">
            <p>First Name: <br />
              <input name="first_name" type="text" value="<?php echo $_POST['first_name']; ?>" size="30" maxlength="50" /><br />
              <br />
              Last Name: <br />
              <input name="last_name" type="text" value="<?php echo $_POST['last_name']; ?>" size="30" maxlength="50" /><br />
              <br />
              E-mail: <br />
              <input name="email" type="text" value="<?php echo $_POST['email']; ?>" size="40" maxlength="200" /><br />
              <br />
              Comment: <br />
              <textarea name="comment" rows="5" cols="50"><?php echo $_POST['comment'];?></textarea>
              <br />
             </p>
          <p><input type="submit" name="send_comment" />
          </p>
        </form>

    You want the form to submit its results to a separate file which processes the data.  If this separate file finds errors, you want it to return control to the form page which would a) display the error messages, and b) populate the fields with the data entered?
    If that's the case, then the processing file would have to send the errors and the data back to the form page either as a) URL variables, b) a cookie, or c) entries in a database.
    Does that help?

  • Excel cannot open the new form. The Form contains schema validation errors.

    i am running the approval workflow on a document library, while trying to open Excel
    file i get the error.
    Excel cannot open the new form. The Form contains schema validation errors.
    Detailed error:
    Element '{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body' is
    unexpected according to content model of parent element '{http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}SharePointListItem_RW'.<o:p></o:p>
    Expecting: {http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}WorkflowLink,
    {http://schemas.microsoft.com/office/inf....
    neeraj

    Hi,
    According to your description, my understanding is that when you are running approval workflow and opening the Excel file, then it will occur the error above.
    For a better troubleshooting, I suggest you can try to create a new normal excel file and then run the workflow and open the file to test if it works. It will help to figure out if this is the file itself issue or the SharePoint issue.
    Also, please provide some more detailed information such as screen capture, it will easier to find the root cause of the issue.
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Infopath Form error - validation errors that are not in the current view?

    Hey Experts,
    I have a Sharepoint 2010 server running on Server 2008. We have a list that has a custom form created using infopath for editing and new creations.
    The problem appeared after a server restart.
    Users can no longer create a new item in the list when they do they get this error:
    The form contains the following errors:
    Field or group: my:Author
    Error: Cannot be blank
    When I try and preview it in infopath2010 it also does the same thing but provides a more detailed error:
    Infopath cannot submit the form because it contatains validation errors that are not in the current view. Errors are marked with a red astrick or red dashed boarder.
    If you cannot find an error in otherviews, there might be a problem with the forms design.
    I checked all thru the form for my:Author field and can't find it on the page as a control or in the list of fields. Any recommendations?
    Thanks!

    Didn't know you also created this as a thread.  If you send me a direct email in the future, please let me know you also created a thread so that I can answer publicly to help others and to get credit for the time/effort spent.  Thanks.SharePoint Architect || Microsoft MVP ||
    My Blog
    Planet Technologies ||
    SharePoint Task Force

Maybe you are looking for

  • Convert Delivered 3x Business Content to BI 7.0

    Hi all, All Standard Content is delivered in 3x (Transfer Rules / Update Rules etc). How can I convert all this Standard Content into BI 7.0 (Transformations etc) with minimum effort. Is that possible? Also can one DataSource be used for both 3x and

  • Using an external microphone in Keynote '09

    I have a keynote presentation and I would like to record my voice audio for each slide. It looks like the computer wants to use the built-in mike to record the audio. Is there any way I can use an external mike plug in to the computer?

  • I want to track the frame number displayed in the camera and match it with the ID of the photo in Photoshop Elements

    Since I may take photos of people and many in a row, I want to log the camera's frame number and have Photoshop Elements import that number or at least show it in the photo properties.  Any suggestions, please.  Thanks  I am using a Fuji Finepix HS 3

  • Adobe Standard 8

    Hi All, Our coorperate firewall is blocking the Adobe Stdrd 8 to register the license and activate. If we whitelist swupmf.adobe.com will this allow any other Adobe updtaes to passthrough? Many Thanks, Harjot

  • Dreamweaver 5.5 crashes on opening

    While doing a routine backup download of files the server, Dreamweaver 5.5 (running on Windows 7) crashed with the standard "An unexpected error has happened  (blah, blah)..."  Since then, I have tried clearing the cache and restarting the computer s