locked
Hide/Show Section Problem - Stay Showing RRS feed

  • Question

  • I have been using code to Show hidden sections with a button as follows. It all works just fine, but when i save it and open it back up, the section is hidden again. I use this function because sometimes the accounts need multiples of the same section, but sometimes there is only a need for one. i want the sections that are added (or shown) to stay showing once the account is saved and reopened again later. Is there a script for that? This is an example of what i have been using.

    crmForm.all.new_sp2zip_c.parentElement.parentElement.style.display='none';

    function AddSupport(){
    crmForm.all.new_sp2zip_c.parentElement.parentElement.style.display='';
    }

    create_button_from_textattribute('new_spadd2', 'Add Another','184px',AddSupport2);

     

    Wednesday, February 2, 2011 6:50 PM

Answers

  • Hi Jacob,

    Take a look at this site, you should be able to piece this together from there and should learn alot more besides:

    http://www.stunnware.com/crm2/topic.aspx?id=JS13

    Tip - 'Part 2' has an example of 'Hiding and showing fields dynamically based on other field values' function.

    Rob


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Monday, February 28, 2011 9:22 PM

All replies

  • Hi Jacob,

    You need to add something to your onload event that indicates if a section should show. For example, your onload event needs to evaluate a field to determine whether or not to show the section. Maybe evaluate a particular field within a section and IF if it contains data, then unhide the section. Alternatively, add a bit field to each section and set to true/false with your button. Your onload event could then evaluate this.

    Hope that helps you along,

    Rob  

     


    CRM MBSS Consultant - GAP Consulting Ltd.
    Wednesday, February 2, 2011 10:22 PM
  • Is there a specific script i should use to do that? this sounds like what i need, but i dont know how to impilent it.
    • Proposed as answer by Faisal Fiaz Monday, February 28, 2011 10:22 PM
    • Unproposed as answer by Faisal Fiaz Monday, February 28, 2011 10:22 PM
    Monday, February 28, 2011 6:43 PM
  • Hi Jacob,

    Take a look at this site, you should be able to piece this together from there and should learn alot more besides:

    http://www.stunnware.com/crm2/topic.aspx?id=JS13

    Tip - 'Part 2' has an example of 'Hiding and showing fields dynamically based on other field values' function.

    Rob


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Monday, February 28, 2011 9:22 PM
  • Rob suggestion is good as you need to change form on click as well as afterwards. Therefore adding a bit field to save this click will give you an opton to manupulate form in two layout and a picklist will give you an unlimited.


    Regards Faisal
    Monday, February 28, 2011 10:22 PM