Last Activity: 6 years ago
Don't allow save in editor if template/form code is present in opposite
Your idea has been submitted and is awaiting moderation.
One accident that can happen when editing things in a hurry or not paying complete attention (especially when many tabs and editor screens are open!) is to accidentally paste the wrong code snippet into the editor window.
Accidentally pasting Form code into a Template or vice versa creates a problem and if you are using the on-screen quick editor then the module won't load, you'll have to edit in the control panel to fix.
Recommendation: Have it check for code when saving. If saving a Template and or is present, DON'T save the file! display a "no" message.