ghost/unghost fields according to user input

So here's my issue: I'm creating a pretty simple user input form, except some fields are not always relevant. For example, if the user is adding a staff member who is temporary, the user needs to enter an expiration date (date staff member leaves). Otherwise, if the staff member is regular, it is not logical to have that field present. Or the field could be present, and just "ghosted" (not sure if that's an actual term). The thing is... I know absolutely no jquery or javascript! If anyone has a solution to this problem, would they mind posting a template/example that I could follow? That would help me out very much! If not, any hints as to how to do in PHP/html (if possible) would be good too. I really appreciate any suggestions, thanks :-)
Your "ghosting" is done by adding the disabled="disabled" attribute to any tag. As for an answer: it would be fruitless for us to provide you with any JavaScript/jQuery solutions if you have no familiarity with the language.

以上就是ghost/unghost fields according to user input的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准