Home Self-Service Portal - Community

required checkbox

Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭

Hi,

we need to publish Request offering which won't allow user to create service request while they don't accept some terms.

But if we create required 'I agree' checkbox, ticket can be saved while leaving the checkbox unchecked, too.

The 'best' which I found out so far is required simple list (dropdown) with just 1 value 'I agree' :) Could you please advise how you handle such situations when you need user to accept license etc.? Thanks

Best Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Accepted Answer

    @Peter_Miklian - The simple list with True and False is the best way. A boolean control will always pass because despite that fact that it is required, false is a valid value.

  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    @Peter_Miklian you could use either a boolean or dropdown for this, and have some custom code on the page that disables the save button if it is not checked or the correct item selected on the dropdown

  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    @Peter_Miklian @Justin_Workman

    I've done a quick change to the version of the toolbox we are using, and added an extra option for force a check box to be checked to be able to submit the request.

    there is some other things added and fixed from the last version uploaded to github as well, i just haven't had time to get the new one uploaded, here is the updated version, and i'll get it uploaded to github with the full list of additions/fixes when i can

    to force the boolean to be checked to be able to submit, put a "@ForceAcceptance" tag just before the boolean on the aro



  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    oops i forgot to force the save button to disabled when it first loads and this tag has been used, insert this after line 237 (right before the call to forceCheckboxAcceptance) to do that

    $('button.btn.btn-link span.fa.fa-check').parent().prop('disabled',true);

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Accepted Answer

    @Peter_Miklian - Yes. I would say request a checkbox that requires checking in order to have a value so form validation will work the way you expect.

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    I created feature request here, all users missing this feature can vote here: https://community.cireson.com/discussion/5331/required-checkbox/

    Thank you.

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    +adding proposed easy "solution" - Save = consent with everything in the form by default :)

    But the easy way is as @Gabriel_Lences said: let the "Save" button work as "Save and agree". You can even rename it in Admin settings\Localization globally or maybe use custom *.js to rename it on particular pages.

    It's basically the same as if you sign a paper document, you agree with all what's written there and you don't need to check/sign every point/clausula/sentence separately :) I'm not a lawyer but hope it's OK to take this approach. +it's definitely polite to let user know this explicitly with 1 simple sentence in Display only text. You cannot force them to read it "but not knowing the law is no excuse" :)

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Accepted Answer

    @Peter_Miklian - The simple list with True and False is the best way. A boolean control will always pass because despite that fact that it is required, false is a valid value.

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭
    edited December 2019

    @Justin_Workman Yes, I know that boolean 'False' is correct value, too.

    Simple element with Yes/No is not exactly what correct - users selects 'No' (he doesn't accept license) so the ticket is created uselessly and will be cancelled by analyst. It would be the same as as boolean, no added value as 'No' answer would fill requirement, too.

    We want to prevent user from saving SR without accepting terms, that's why I say list with 1 'forced' value 'Yes' is the only way now, although it looks silly.

  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    @Peter_Miklian you could use either a boolean or dropdown for this, and have some custom code on the page that disables the save button if it is not checked or the correct item selected on the dropdown

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭

    In fact, it might be nice if @Jeff_Lang's suggestion was somehow part of the RO Toolbox @john_doyle

  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    @Peter_Miklian @Justin_Workman

    I've done a quick change to the version of the toolbox we are using, and added an extra option for force a check box to be checked to be able to submit the request.

    there is some other things added and fixed from the last version uploaded to github as well, i just haven't had time to get the new one uploaded, here is the updated version, and i'll get it uploaded to github with the full list of additions/fixes when i can

    to force the boolean to be checked to be able to submit, put a "@ForceAcceptance" tag just before the boolean on the aro



  • Jeff_LangJeff_Lang Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    oops i forgot to force the save button to disabled when it first loads and this tag has been used, insert this after line 237 (right before the call to forceCheckboxAcceptance) to do that

    $('button.btn.btn-link span.fa.fa-check').parent().prop('disabled',true);

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭

    @Jeff_Lang thank you for the customization but since Request Offering Query Picker was released natively in portal we do not need to use ROToolbox.

    @Justin_Workman maybe add this option to ROQP modify true/false input? Should I create separate feature request? Thanks.

  • Justin_WorkmanJustin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭
    Accepted Answer

    @Peter_Miklian - Yes. I would say request a checkbox that requires checking in order to have a value so form validation will work the way you expect.

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    I created feature request here, all users missing this feature can vote here: https://community.cireson.com/discussion/5331/required-checkbox/

    Thank you.

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭

    Linking similar discussion/request from @Carol_Lee: Presenting Acknowledgment terms in the Portal

  • Peter_MiklianPeter_Miklian Customer Advanced IT Monkey ✭✭✭
    Accepted Answer

    +adding proposed easy "solution" - Save = consent with everything in the form by default :)

    But the easy way is as @Gabriel_Lences said: let the "Save" button work as "Save and agree". You can even rename it in Admin settings\Localization globally or maybe use custom *.js to rename it on particular pages.

    It's basically the same as if you sign a paper document, you agree with all what's written there and you don't need to check/sign every point/clausula/sentence separately :) I'm not a lawyer but hope it's OK to take this approach. +it's definitely polite to let user know this explicitly with 1 simple sentence in Display only text. You cannot force them to read it "but not knowing the law is no excuse" :)

Sign In or Register to comment.