Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Disable checkbox only if data is present

Participant ,
Sep 22, 2006 Sep 22, 2006
Ok this is my problem. I create a leave request page, the employees log in. After they log in it takes them to a calandar. On the calandar they request the leave by clicking a check mark box next to the day they are requesting and hit submit. And the record is updated. To prevent duplicate entrys in our database, if the employee wants to request additional leave for that month they login and return to the calandar. The calandar already displays the days that they have prevously requested. Now this is my problem. It displays the days they prevously requested as planed, but I want to block the user from changing any of the exising checkmarks from a prevous request. Is it possible to Gray these out or hide these fields with checkmarks. Thanks for you help in advance.
TOPICS
Server side applications
312
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 22, 2006 Sep 22, 2006
if they have allready requested a day print disabled='disabled' in the checkbox.
what i would do is write a function like:
function is_day_selected($date){
//check the database
//if the date is requested then return true
//else return false
}
then in your checkbox
<?php if(is_day_selected($date){echo "disabled='disabled'"; ?>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 22, 2006 Sep 22, 2006
LATEST
How would i have it write disabled if the box is check? Do I go into atributes or do I have to write a function.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines