Documentation of generate_form_field in options.inc.php

I am trying to restrict the appointment status for some system reserved options. I mean that the user would only be able to select 5/8 of the options.

I am too new to php to fully read code yet (i’m at the copy/paste change and pray stage), and I have searched for any use of the ‘disabled’ functionality referred to on line 381. I also searched for documentation on the generate_form_field on the wiki, but none of the parameters were shown. Is there documentation showing how to disable specific list items somewhere? Alternatively, if someone could explain it for me, maybe this can be added to the documentation.

My current solution is to write a custom generate_select_list with a loop that accomplishes what I want, but I would prefer to use standard code.

Thanks for everything. This is a great project and has a great community!

Thanks,
Derek

Has anyone used the disabled argument in generate_form_field for data type 1? If so, I can use it as a model to do what I want.