Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Mandatory field for list

Mandatory field for list 1 month 3 weeks ago #79341

  • bonsaiko
  • bonsaiko's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Hello,

I created a custom list, to be used on opportunity form.
This field has to be mandatory. But the problem is that there is always a field that is selected (the first option).
So even if the user forgets to choose the correct option, the first option will be selected.
What I need is :
First option has to be blank and when user validates the form, it must display the error message, saying that field can't be empty.

I googled this but couldn't find anything, which I find surprising.

Could somebody please help me ?

Thanks a lot.
The administrator has disabled public write access.

Mandatory field for list 1 month 3 weeks ago #79342

  • urdhvatech
  • urdhvatech's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Official code partner
  • Posts: 556
  • Thank you received: 114
  • Karma: 19
Hello,

You can edit the dropdown list options from admin and add the blank option into a list.
Admin->Dropdown Editor and select the List that you have used in your field.
Thanks & Regards,
Team Urdhva Tech
Web : www.urdhva-tech.com
Skype : urdhvatech

- Official code partner
- Official Integration partner
The administrator has disabled public write access.

Mandatory field for list 1 month 3 weeks ago #79345

  • bonsaiko
  • bonsaiko's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Thanks, but no, I'm not able to add any blank option...
I'm getting "undefined" alert box and I'm not able to save it.

Could you please be more specific ?
Thanks a lot.
The administrator has disabled public write access.

Mandatory field for list 1 month 3 weeks ago #79346

  • urdhvatech
  • urdhvatech's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Official code partner
  • Posts: 556
  • Thank you received: 114
  • Karma: 19
"Undefined" means, You might have incorrect file permission. That you or your server admin can fix it.
Here is the documentation about file permission https://docs.suitecrm.com/admin/installation-guide/downloading-installing

Another way to add value in your dropdown is by adding value in files directly.
custom/include/language/en_us.lang.php
and search list name of the option that you are trying and add the first option as blank in that array.

for example :
'' => '',
Thanks & Regards,
Team Urdhva Tech
Web : www.urdhva-tech.com
Skype : urdhvatech

- Official code partner
- Official Integration partner
The administrator has disabled public write access.
The following user(s) said Thank You: bonsaiko

Mandatory field for list 1 month 3 weeks ago #79349

  • bonsaiko
  • bonsaiko's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Great ! it worked. Thanks a lot.

By the way, I can SSH my server but I'm not able to change owner...

I made a test on just one file :

chown www-data:www-data TreeData.php
returns : chown: changing ownership of ‘TreeData.php’: Operation not permitted

And :
sudo chown www-data:www-data TreeData.php
asks me for my password, and then returns this :
birdybadmin is not in the sudoers file. This incident will be reported.

So I was not able to change owner on my files, which leads to errors in the crm.

I have another issue about mail settings, would you be ok to help me if I open a new thread ?
That's the only thing not working and I would be glad to have some help.
Thanks again !
The administrator has disabled public write access.
Time to create page: 0.037 seconds
Powered by Kunena Forum