Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do I Disable Inline Edit using JavaScript?

I want to keep the user from changing values in certain ConfiForm fields within a TableView macro after a certain date.  Basically, I want to make all the previous weeks' fields readonly.  I have JavaScript that figures out what "today" is and what week of the year it is.  I have my fields named for those weeks.  I have the code, what I'm trying to get are the HTML id's that will allow me to access those fields and make them ready only.  Alternatively, I need a way tick the "Disable Inline Edit" box in the Form Field macro in JavaScript in the AJS.toInit function.  Any ideas?

1 answer

1 accepted

0 votes
Answer accepted

Ok.  My collague fiugred it out.  In my for loop in my AJS.toInit function, I needed:

let fieldname = "td.cfgrid.cf_week"+i.toString()+"hours";

document.querySelectorAll(fieldname)[0].style.pointerEvents = "none";

The above basically has the effect of checking the "Disable Inline Edit" box, but in JavaScript.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events