Got feedback or spotted a mistake?
Leave a comment at the end of this page or email contact@krishagni.com
How to remove default value set for the custom form field?
You can remove the default value set for a dropdown, radio button form fields by adding, deleting dummy PV, or updating the form XML file.
Below listed are the options to remove the default value 'Not specified' from the drop-down field 'Suffering from other cancer?' of the form 'Cancer Details'.
Option-1: Add dummy permissible value (PV)
- Go to the edit page of the form 'Cancer Details'.
- Edit the field 'Suffering from other cancer?'
- Add a dummy permissible value to the field.
- Set the dummy permissible value as the default value.
- Delete the dummy permissible value.
Option-2: Update the form XML file
- Go to edit page of the form 'Cancer Details'
- Click on 'Export' button to export the form XML file
- Open the downloaded form XML file in a text editor (If the zip file is downloaded, unzip the file and open the form XML file in a text editor)
- Remove the value 'Not Specified' from the tag '<defaultValue><![CDATA[Not specified]]></defaultValue>'
- Save the form XML and import it back. (If the downloaded file has the permissible values folder, then zip updated form XML file along with the PVs folder and import back)
- Refresh the browser, the 'Not specified' value will not be the default value for further data entry
Refer wiki page for more details on export/import of a form
Reimporting the form will not affect the existing data.
Got feedback or spotted a mistake?
Leave a comment at the end of this page or email contact@krishagni.com