How to pass value from HTML to client in Widget????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 06:56 AM
Hi Experts,
I need to pass the variable value of HTML to Client script . Once we submit the form on the portal after entering the value and selecting the option that value i need to fetch in client script and further use those value. How to do this?/
I have two scenarios:
scenario 1-
Bewlo are the variable script used in HTML
<div class="row heightPad">
<div class="col-md-12">
<div class="labelHead pb5">${Manually provide application(s) that you want to add (optional)}<i class="fa fa-question-circle padder-xs help-tag-icon" ng-click="windowsEarlyAdopter.expand_help = !windowsEarlyAdopter.expand_help" aria-expanded="true" style="color:green" ng-model = "c.manualApp"></i></div>
<div class="nosidepad">
<div class="help-tag">
<i class="fa fa-times pull-right wrapper-xs help-tag-icon" ng-click="windowsEarlyAdopter.expand_help=false" aria-label="Close" ng-if="windowsEarlyAdopter.expand_help" tabindex="0" role="button"></i>
<div ng-if="windowsEarlyAdopter.expand_help" class="text-muted well wrapper-xs m-b-sm ng-scope">
<span title="Help" class="m-b-xs m-t-xs"></span>
<span>
<p style="font-size: 12px; !important">${If you can not find the application(s) you want to add, then manually input them.}</p>
</span>
</div>
</div>
</div>
scenario 2- This variable is a Checkbox type:
Below are the code How to fetch the selected value in Client script:
<label class="boldtext">${Select legacy port forwarding you want to add (optional)}</label>
<div class="checkboxes">
<input type="checkbox" name="citrix_requires_locally_installed_citrix_web_client_or_pin" ng-model="Citrix" ng-click=setFormValue(Citrix,'citrix_requires_locally_installed_citrix_web_client_or_pin') />
<label>${Citrix – requires locally installed Citrix web client or PIN }</label>
<br/>
<input type="checkbox" name="lotus_notes_via_locally_installed_client" ng-model="Lotus" ng-click=setFormValue(Lotus,'lotus_notes_via_locally_installed_client') />
<label>${Lotus Notes – via locally installed client}</label>
<br/>
<input type="checkbox" name="oracle_access_an_oracle_database" ng-model="Oracle" ng-click=setFormValue(Oracle,'oracle_access_an_oracle_database') />
<label>${Oracle – access an Oracle database}</label>
<br/>
<input type="checkbox" name="sql_access_a_sql_database" ng-model="Sql" ng-click=setFormValue(Sql,'sql_access_a_sql_database') />
<label>${SQL – access a SQL database }</label>
<br/>
<input type="checkbox" name="ssh_secure_shell_access_also_sftp" ng-model="Ssh" ng-click=setFormValue(Ssh,'ssh_secure_shell_access_also_sftp') />
<label>${SSH – Secure Shell Access (also SFTP) }</label>
<br/>
<input type="checkbox" name="rdp_microsoft_remote_desktop_client_for_windows_server_access" ng-model="rdp" ng-click=setFormValue(rdp,'rdp_microsoft_remote_desktop_client_for_windows_server_access') />
<label>${RDP – Microsoft remote desktop client for Windows server access }</label>
Thanks in Advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 11:32 PM
Hi @AK
it is because of your ng-if here: example
<div ng-if="c.data.list" class="panel-body vdp table-responsive">
Instead of ng-if, try using ng-show instead: example
<div ng-show="c.data.list.length > 0" class="panel-body vdp table-responsive">
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 12:35 AM
Hi
What script do i need to use in client side and in HTML what i need to add please suggest.
I have tried like :
ng-model = "c.manualApp"
And in client script i am trying to fetch this value using
$scope.c.manualApp But i am not geeting .
please suggest on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 12:27 AM
Hi Ak9
is you issue fixed? I am having a similar issue. can you please share what you have done to pass value from html to client side