Stop dynamic actions running on validation error? - oracle

I have an Oracle APEX page that has a dynamic action which hides some fields at page load time, that are then made visible via other dynamic actions as the user interacts with fields on the page.
If the user submits the page with validation errors, the page reloads and it appears the dynamic action is being executed again and fields which have been filled in and should now be visible are being hidden again.
I'm wondering if I can make the page load dynamic action conditional so that it executes only when the page is not being rendered as a result of a validation error?
Many thanks for any assistance!

It appears I've found the solution.
One of the conditions available for whether the dynamic action gets executed is "No Inline Validation Errors Displayed".
Selecting this for the dynamic action that hides controls at page load effectively forces it not to run when validation errors are encountered.
Thanks to anyone who gave this some thought! Also, if you have any other helpful hints on effective validation with dynamic actions, I would be very interested in seeing them.

Related

JSONObject["caption"] not found

We are using form designer of servicenow to change elements on a form.
The table used to create the form is extended by the task table and contains a workflow with approvals and various stages.
When we try to change something within form designer, it does not matter what it is, renaming a field from summary to summarys for instance and clicking save.
The action gives this error:
JSONObject["caption"] not found
Only some forms are affected by this issue, for instance incident forms, change forms all open and can be changed and saved.
I have a feeling that this error is related to a known issue but i just wondered if anyone on here has seen it.
NB: It is not possible to share my JSON response because it's all done behind the scenes by servicenow. I am in a form design view and I am simply clicking save on a form change
Thank you for your time
This has now been resolved.
Turned out a title on a form header had more than 40 characters and this was causing the error on form save.
Max limit on a title

Validations not working on page submit of oracle apex

I know that all validations get executed on Page Submit, but i have actions defined on page submit which i want to be executed first followed by the validations, ie decide the execution options for these dynamic actions to be executed first and then the validations, because right now my validations don't seem to work.My dynamic actions are defined in function and global declaration as $("#submit").click( function (){ })
Don't override events in Javascript. I forget, but you may interfere with how Apex handles them. What you want to do is:
Set your button's action to be Defined By Dynamic Action
Create a Click Dynamic Action on your button
Add a True event for whatever it is you're trying to do
Your final True event should be Submit, with an appropriate Request value
If your Validations are not executing correctly, turn on debugging mode and look in the debug log for why they're not working.

WP Gravity Forms Speed Loading Issue

I've searched alot about this issue but haven't got any solution, thats why posting here. I've a form In Gravity Forms which has lots of fields and also conditional fields. Say more than 100. Its loading fine but it took over 20 minutes to on website, which really annoying.
So i want something AJAX like solution, mean when page loads, than only first input field will show than on clicking on that further fields should be show via AJAX (or from database). So please help me our on this issue. And thanks in advance :)
You can use the "Page Break" field to break your form into multiple pages.
This way you can have only one or several fields in your first page, then the next set of fields on the next page, etc.
This will not use AJAX by default, but will certainly make your form load faster. And you can implement AJAX loading for the page steps with some custom coding if this is a requirement.

APEX: Call JavaScript function after validation but before processing

I have been tasked with re-creating an old PL/SQL Web Toolkit front end in Application Express (Apex).
I would like to display a popup after the page is submitted and after computations and validations.
The page can be submitted by clicking a button OR by hitting enter.
I have googled and got a modal popup working (called by javascript) but I can't seem to call it at the right point. I can call it on submit (before the validations etc.) but not after the validations.
I have tried creating a branch to URL at the correct processing point and then have the URL set to:
javascript:openForm();
But then I get a page will not display error.
Can anyone out there explain how I could do this?
Apex Version: 4.0.2
Oracle 10g
I suppose what you want to do is to perform the validations, have values submitted to session state, but not execute further processes.
However, when you submit the page it is sent to the server; and everything you see in the page processing region will sequentially fire. There is no way to halfway through the processes call a javascript function, since basically you are not on the clientside anymore.
What you can do is to create a branch after your validations to the same page. Redirect to it but provide a REQUEST value, for example OPENFORM.
Create a dynamic action, firing on page load, with a true action that executes javascript and opens up your modal page. Then set the condition on your dynamic action to Request = Expression 1, providing the request value to Expression 1 (OPENFORM).
(Note that this is the Conditions region, and not the 'Condition' field of the 'When' region)
This should cause the page to be submitted, validated, then re-loaded but with a request value, and the dynamic action firing, opening your modal page.
Just a point of interest:
If you have actual processes on this page though, then be careful with the Enter key. Buttons by default submit to session with the request value set to their name, and thus making it possible to conditionally execute processes or branches. The enter key does not submit with a request value set i believe. So if your branch is conditional, the enter key might simply skip over it.

ASP.NET MVC 3.0 - User Hammering Submit Button

Even using the Post/Redirect/Get method, and including javascript to disable a button after it has been clicked, I am having a problem with users being able to just rapidly hammer a submit button and get multiple form posts in before server side validation can stop it.
Is there any way to stop this? I've even tried this method : how to implment click-once submit button in asp.net mvc 2?
And I've tried outright blocking the UI with jquery blockUI. I have BOTH client side and server side validation in place, and they work perfectly - but a user smashing the submit button twenty times in under a second just seems to keep breaking it.
Use javascript to wire the onclick event to disable the button.
If you are already doing that and you can still get multiple form posts, then the problem is a delay between the clicking of the button and the button being disabled, and you must be submitting the form multiple times during this delay.
To fix this, make the onclick event first make a call to stopPropagation() to stop the submit event. Then validate that the form is not in submission-blocked state. You can do this by creating a page-scoped javascript variable with a boolean value like can_submit. Test for can_submit being true before submitting the form. Set the can_submit = false when the button is disabled, so even if the button is not disabled fast enough, the form will not submit if the value has already been set to false.
In most cases I'd say that this isn't worth fixing - if a user is going to do something as silly as clicking submit 20 times they should expect to get an error.
The only real fix for this is to set up your action to only accept the same form once - add a hidden field that is set to a random value when the form is loaded. When the form is posted, save that value somewhere temporarily and if it is already there you have a duplicate request that shouldn't do anything.

Resources