- This topic is empty.
- 03/07/2011 at 9:38 am #4816
When a required field has no data we display in red the message "Required!" next to the field. This is the default behavior.
You can add a popup message if you create a custom action based on the code sample we supply installation folder of the product (…\program
files\Quest Software\in the Quest Web Parts for Sharepoint xxx).
Open the solution using Visual Studio, go to the pleCustomActionsAndCustomLayouts project and open the file pleCustomActionEx.cs.
In the Perform method you need to do something like this
if (item != null)
if (item["CityID"] != null)
"CityID can't be empty";
And that will popup the message you can see it in the below. Please not thet the CityID in my list is not a required field.
If you have nay questions please let me know.
- 03/29/2011 at 9:48 am #3973
Is it possible to have a popup when the user click ‘Save’ but the required fields have not been filled out?
- 03/29/2011 at 9:48 am #4808
The "Required When" behavior can be achieved without coding a custom action. In QWP 5.4.1, you can create a form component behavior that will check the value of one field (e.g., check if the field is null) and make another field required. For example, the form component xml behavior below is placed on the "Contact Type" field. If the Status field is equal to behind, then the Contact Type field can not be null which makes the field required. When Contact Type is null and the user clicks the Save button, then the user sees the message,"Contact Type is required when Status is Behind".
<Component Type="Field" ID="Contact Type">
<RequiredWhen Message="Contact Type is required when Status is Behind">
<FieldRef Name="Status" />
You must be logged in to reply to this topic.