Elements qui doit disparaitre et apparaitre grace a un bouton

Bonjour j’essaye depuis 2 semaines de créer un dashboard avec unviversal dashboard, et y faire disparaître des éléments puis les faire réapparaître lors de l’activation d’un bouton.
Voici le code que j’ai créer qui est très random, mais ces un début:

############## Interface1 ######################################

New-UDCard -Id ‘CardIncident’-Content {
New-UDTypography -Text 'Veuillez sélectionner le type incident : ’ -Style @{ color = ‘black’ }

Chekbox

New-UDButton -Id ‘TextImpression’ -Text ‘Impression’ -OnClick {}
New-UDButton -Id ‘TextRéseaux’ -Text ‘Réseaux’ -OnClick {}
New-UDButton -Id ‘TextBureautique’ -Text ‘Bureautique’ -OnClick {}
New-UDButton -Id ‘TextLogiciels’ -Text ‘Logiciels’ -OnClick {}
New-UDButton -Id ‘TextMateriel’ -Text ‘Materiel’ -OnClick {}
New-UDButton -Id ‘TextMobilité’ -Text ‘Mobilité’ -OnClick {}
}

############### Interface2Configuration ####################################

New-UDCard -Id ‘CardConfiguration’-Content {
New-UDTypography -Text "Plus de détail sur votre problème : " -Style @{ color = ‘black’ }

Chekbox

New-UDButton -Id ‘ConfigurationSession’ -Text ‘Session’ -OnClick {}
New-UDButton -Id ‘ConfigurationImprimante’ -Text ‘Imprimantes, Scan’ -OnClick {}
New-UDButton -Id ‘ConfigurationAD’ -Text ‘Active Directory’ -OnClick {}
New-UDButton -Id ‘ConfigurationAS400’ -Text ‘AS400’ -OnClick {}
}

##################### Interface3Réseaux ########################

New-UDCard -Id ‘CardRéseaux’-Content {
New-UDTypography -Text "Plus de détail sur votre problème : " -Style @{ color = ‘black’ }

Chekbox

New-UDButton -Id ‘RéseauxInternet’ -Text ‘Internet’ -OnClick {}
New-UDButton -Id ‘RéseauxVPN’ -Text ‘VPN’ -OnClick {}
New-UDButton -Id ‘RéseauxPartage’ -Text ‘Partage’ -OnClick {}
New-UDButton -Id ‘RéseauxPCTel’ -Text ‘PC, Téléphone’ -OnClick {}
}

###################### Interface4Logiciel #############################

New-UDCard -Id ‘CardLogiciel’-Content {
New-UDTypography -Text "Plus de détail sur votre problème : " -Style @{ color = ‘black’ }

Chekbox

New-UDButton -Id ‘LogicielOutlook’ -Text ‘Outlook’ -OnClick {}
New-UDButton -Id ‘LogicielApic’ -Text ‘Apic’ -OnClick {}
New-UDButton -Id ‘LogicielAutocad’ -Text ‘Autocad’ -OnClick {}
New-UDButton -Id ‘LogicielTeams’ -Text ‘Teams’ -OnClick {}
New-UDButton -Id ‘LogicielNavigateurs’ -Text ‘Navigateurs’ -OnClick {}
New-UDButton -Id ‘LogicielPDF’ -Text ‘PDF’ -OnClick {}
New-UDButton -Id ‘LogicielWord’ -Text ‘Word’ -OnClick {}
New-UDButton -Id ‘LogicielExcel’ -Text ‘Excel’ -OnClick {}
New-UDButton -Id ‘LogicielLotus’ -Text ‘Lotus’ -OnClick {}
New-UDButton -Id ‘LogicielNextDoc’ -Text ‘NextDoc’ -OnClick {}
New-UDButton -Id ‘LogicielAutres’ -Text ‘Autres’ -OnClick {}
}

######################### Interface6Materiel #################################

New-UDCard -Id ‘CardMateriel’-Content {

New-UDTypography -Text "Plus de détail sur votre problème : " -Style @{ color = ‘black’ }

Chekbox

New-UDButton -Id ‘MaterielPC’ -Text ‘PC’ -OnClick {}
New-UDButton -Id ‘MaterielTextTel’ -Text ‘Téléphone’ -OnClick {}
New-UDButton -Id ‘MaterielTextImprimante’ -Text ‘Imprimante’ -OnClick {}
New-UDButton -Id ‘MaterielTextEcran’ -Text ‘Ecran’ -OnClick {}
New-UDButton -Id ‘MaterielAutomate’ -Text ‘Automate’ -OnClick {}
}

###################################### Interface8 ###############

New-UDCard -Id ‘CardDescription’-Content {
New-UDTypography -Text 'Un derniere éffort pour le commentaire : ’ -Style @{ color = ‘black’ }
New-UDForm -Content {
New-UDTextbox -Id ‘TextCommentaire’ -Placeholder “Un Commentaire”
} -OnSubmit {
Show-UDToast -Message $EventData.TextCommentaire
}
}

Il faudrait cacher les Card et les faire apparaître lorsque on choisi un incident selon leur type, Materiel avec la cardMateriel, logiciel avec la cardLogiciel etc …

Merci d’avance pour votre aide.

Bonjour @bob2105 sorry that is about as far as my French goes. :slight_smile:
If you look on my github repository you will see lots of UD examples. As for hiding an element on a button click look at the Example.ps1 on my repository here:-

I also write numerous blogs on Powershell UniversalDashboard here:-

And I have many examples of using custom components I have built. I hope the initial link I posted gives you the answer. Sorry my French is rubbish but I believe this is what you were after…? :slight_smile: