Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
pdeneu Super Contributor.
Super Contributor.
75 views

Unset required fields in PRD

Hello,

i created a prd which give the user a selection (RadioButtons) to choose a action which should be performed.

Choosing one of the selections, the fields for this action will be displayed.

For Example:

* Add User  or * Delete User

Selecting Add User: Username*, Location, Initial Password*

Selecting Delete User: DNLookup*, Reason

In both "sub-forms" i set fields to required. If i select "Add User", click on Submit i got the info "Username: field is required. Please specify a value.".  Switching now to "Delete User", the info of the "Add User" field requirement still keeps up.

Is there any idea how to "reset" the form, remove the field requirement or h


--
https://www.lanworks.de
Labels (1)
0 Likes
1 Reply
Knowledge Partner
Knowledge Partner

Re: Unset required fields in PRD

In an on-change event tied to the radio button, get the current state of the button ("add" or "delete").

If current state is "add", then use set-required() to set the "add" fields to required, and the "delete" fields to not-required. You might also want to use hide() to remove the "delete" fields from the visible form.

Else, the current state is "delete", so set the "add" fields to not required and hidden, and the "delete" fields to required and visible.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.