how to validate dijit radiobutton? - forms

I have a set of dijit.form.RadioButton elements. I need to be this set as mandatory. When submitting the form it should stop if no radio button is selected. Is this possible?

In your form's onSubmit function, check to see if the radio buttons value is null or not:
if (this.attr("value").radio)
It's true if set to the value of one of the radios, false if null (no radio is selected). Here is a full example.

Related

Access form / textbox default value problem

I have an access continous form:
I placed a unbound text box txt1 in the header where user enters the number of the assignment. I want all rows in the form to have the same assignement number - entered only once in the header. (Later, txt2 would be hidden).
In the form, i added a another textbox and placed default value as =[txt1].
My problem is that this text is being populated only in the second row, when i start typing in the first row.
As this:
Refreshing does not help.
Any ideas?
Thank you!
Textbox 2 does not populate because the default value is not available when record edit is initiated by input into unbound textbox 1. Code will have to set Value of textbox 2 with the textbox 1 input. So with textbox 1 AfterUpdate event:
Me.textbox2 = Me.textbox1.
Alternative is to not use unbound textbox. Instead, use AfterUpdate event of textbox 2 to set its DefaultValue property. Subsequent records will populate with that value until user enters another and the DefaultValue will be reset.

Null Values in Checkbox Custom Fields

I'm noticing that editing a matter from the web interface and adding a checkbox custom field to the matter does not automatically set that checkbox to 'false.' Instead, unless you set the box to true, save it, and then re-edit it to uncheck that box, you cannot get a subsequent api call to return a 'false' value.
It strikes me that this ought to be corrected?
This is Matt G. from Clio's API support team.
You're correct that checkbox custom fields don't return a false value unless thy're actually toggled on and then off. Until some value is set, the checkbox field won't have any information stored in it and will return a null value.
We'll evaluate the functionality and look into updating how checkboxes work. In the meantime, if you want to get records of all Matters with an unchecked checkbox, you can look for Custom Field Values that are false and null.

Orbeon: reset value of hidden field

I have an autocomplete field and radio buttons which have a visibility condition, is there any possible way to reset their value when the visibility condition is false оr to somehow get information about the visibility of those fields (something similar to /text() or /#label)?

React: Uncontrolled radio button input with value attribute throws warning

I've read through the React docs for forms, and I understand that an <input> element with a value attribute will create a controlled input. However, for a radio button or checkbox, shouldn't the input only be controlled if it has a checked attribute, and ignore the existence of a value attribute?
Typically the value attribute of a radio button or checkbox is not representative of its state, but rather of the value that should be passed back to the server.
I'm getting an error suggesting that the docs are correct and that you can't put a value attribute on an uncontrolled radio button input. The JSFiddle here shows the error I'm getting in the console when I click on the radio buttons:
Warning: Form is changing a uncontrolled input of type radio to be
controlled. Input elements should not switch from uncontrolled to
controlled (or vice versa). Decide between using a controlled or
uncontrolled input element for the lifetime of the component.
If I remove the value attributes from the inputs, the error no longer appears [JSFiddle].
So is there any way to include a value on an uncontrolled radio button (or checkbox) input with React?

how to make radio button in option group selected by default in access form

I have an option group in access form. Option group contains 2 radio buttons.How do i make one of the radio button select by default. i tried to set option group Default value =
[ogrp].[DefaultValue]=2
It is not working.
Make one of the radio button select by default by
Me.OptionGroupname.DefaultValue=1 'DefaultValue= change as required