Looking for a little assistance.
I have a confiform form on a Confluence page where I'm running some JavaScript to hide fields on the form
Example:
<script type="text/javascript"> jQuery(document).ready(function($) { // hide all optional elements $('#i_labelfor_jirakey').hide(); $('#i_holdingrow_jirakey').hide(); $('#i_labelfor_approvalsheader').hide();
etc....
On a child page, I've created a table view macro to display the form fields to allow for editing. Problem is that the hidden fields are not hidden when opening up the form from the "edit" button on the Table View macro.
I've tried copying and pasting over the JS code to the page where the Table View macro is but nothing seems to work.
Hoping it's something simple that I'm just not seeing / picking up on. Any help is appreciated!
For hiding the fields in ConfiForms Forms please use the ConfiForms Field Definition Rules.
As Adrian has mentioned the script you have runs on a page load, but the form is rarely loaded on page load (unless it is embedded)
Using the pure CSS solution worked but by hiding the holding row class as opposed to the id. Doing this makes it so that if I click "edit" on a record displayed by a Table View Macro, the CSS is able to hide the fields in the form that pops up.
My solution:
<style>
.i_holdingrow_jirakey,
.i_holdingrow_approvalsheader {
display: none;
}
</style>
Thank you both for steering me in the right direction!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why are you using JavaScript?
Can't you solve your problem with pure CSS, i.e.
<style>
#i_holdingrow_jirakey,
#i_holdingrow_jirakey,
#i_labelfor_approvalsheader {
display: none;
}
</style>
The elements may have other selectors in edit mode. The problem with your JavaScript is, that it just works once - when the page is loaded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.