i created a button with custom html , i want when i click on that button a new hidden section show up how to do that

Confluence User - 29 Mar, 2023

,first how to put the section invisible , when i click on the button i want a hidden section with information from the other section to show up 

forms

6


30 Mar, 2023
confluenceUser
confluenceUser

Hi, you don't need to use custom JavaScript for that. You could if you prefer to, but it would be much simpler to just use Show and Hide Form Sections.  

13 Apr, 2023
confluenceUser
confluenceUser

thanks for your answer ; but i don't wanna use a select box lets say that im building a calculator  i got two input fields i created a button i want when clicked a new section show up with the result 

13 Apr, 2023
confluenceUser
1
confluenceUser

Hi,

You can achieve this as follow:

  1. Create a hidden field and give it a value, use this hidden field for section visibility criteria.
  2. When you click on button, using js/jquery, set the value to hidden field and call the change function as below

    <script>
    	$('#button').click(function(){
    		$('hiddenFieldId').val('NEWVALUE').trigger("change");
    	});
    </script>



    This should do the trick.
13 Apr, 2023
confluenceUser
confluenceUser

hello Mr.habbi thanks for your answer , what i understand is this "check the photos bellow " : tell me what to change : 

13 Apr, 2023
confluenceUser
confluenceUser

yea your code works fine its just when i click on that button the  form is submited and the page is fast refreshed so the hiden field value gets back to its default value , do u have any ideas ?

13 Apr, 2023
confluenceUser
confluenceUser

thanks alot Mr.habibi , all works fine now 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print