# Add/Remove asterisk(\*) for fields in default create/update action forms

**URL:** https://community.forestadmin.com/t/add-remove-asterisk-for-fields-in-default-create-update-action-forms/5496
**Category:** Help me!
**Created:** [November 7, 2022, 9:00am UTC](https://community.forestadmin.com/t/add-remove-asterisk-for-fields-in-default-create-update-action-forms/5496 "2022-11-07T09:00:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Saurav\_Suman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/saurav_suman/32/3709_2.png) [@Saurav\_Suman](https://community.forestadmin.com/u/Saurav_Suman)
#### Post date: [November 7, 2022, 9:00am UTC](https://community.forestadmin.com/t/add-remove-asterisk-for-fields-in-default-create-update-action-forms/5496/1 "2022-11-07T09:00:44Z")

</div>

## Feature(s) impacted

Asterisk mark beside field names in default action forms

## Observed behavior

As of now, the entity model defines `allowNull` attribute for all the columns of that entity.  
If `allowNull` is `true` , FA action shows it as non-mandatory, because this can be left empty and database will support by setting `null` in that column.  
But if `allowNull` is `false` , FA action shows it as a mandatory field where as per our use case we preset that column with a default value and don’t expect user to input that field.

## Expected behavior

We wanted to know there exists some sort of custom setting where we can declare which fields should show asterisk mark and which all should not show irrespective of whether the column is mandatory or non-mandatory in database ?

## Context

- Project name: Curator
- Team name: Developers

---

<div class="post-metadata">

### Author: ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)
#### Post date: [November 7, 2022, 2:18pm UTC](https://community.forestadmin.com/t/add-remove-asterisk-for-fields-in-default-create-update-action-forms/5496/2 "2022-11-07T14:18:51Z")

</div>

Hello,  
You can allow the field to be null and add a default value when the database receive null value. After that, on the forestadmin app, you can enable the “read only” mode. It means the user can’t send a value.

An example:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/2/2118faceefb13c8ae0f1cae8513ee1213ec59311.png)

I hope it will help you 🙂

---

<div class="post-metadata">

### Author: ![Saurav\_Suman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/saurav_suman/32/3709_2.png) [@Saurav\_Suman](https://community.forestadmin.com/u/Saurav_Suman)
#### Post date: [November 9, 2022, 6:17am UTC](https://community.forestadmin.com/t/add-remove-asterisk-for-fields-in-default-create-update-action-forms/5496/4 "2022-11-09T06:17:13Z")

</div>

Thanks @Alban_Bertolini for the reply.  
We wanted to have the field still editable and not read-only.  
Actually, in the smart action there are fields that are custom handled in the controller even if the field is mandatory in database but from smart action we are allowing empty value and wanted same behavior in default create/update actions provided by FA so it would have been better to not show asterisk sign there.

I know that setting the allowNull property to true for those field would do the job but just checking if there is any other way to achieve this so that existing schema is not touched.

---

<div class="post-metadata">

### Author: ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)
#### Post date: [November 9, 2022, 10:03am UTC](https://community.forestadmin.com/t/add-remove-asterisk-for-fields-in-default-create-update-action-forms/5496/5 "2022-11-09T10:03:53Z")

</div>

Have you tried to put the field as _allowNull: true_ and add a [validate](https://sequelize.org/docs/v6/core-concepts/validations-and-constraints/) attribute by adding custom validator ? FA checks the _allowNull_ constraint to know if it should add the mandatory field, maybe a hack is to add a custom validator. I hope it will help you 🙏
