- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 10:08 AM
html
<div>
<h1>Check Your Attendance Details</h1>
<input type="text" name="name" placeholder="Enter Your Name" ng-mode="c.data.name">
<input type="text" name="roll_no" placeholder="Enter Roll No" ng-model="c.data.roll_no">
<button ng-click="vis()">Submit</button>
<p>{{data.name}}</p>
<div>
client script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 11:21 AM
Hi there,
Try below:
HTML:
<div>
<h1>Check Your Attendance Details</h1>
<input type="text" name="name" placeholder="Enter Your Name" ng-model="c.data.name">
<input type="text" name="roll_no" placeholder="Enter Roll No" ng-model="c.data.roll_no">
<button ng-click="c.vis()">Submit</button>
<p>{{data.name}}</p>
<div>
Client Script:
api.controller=function($scope) {
/* widget controller */
var c = this;
c.vis = function(){
c.server.update();
alert(c.data.name);
}
};
Server Script:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
data.name = "";
data.roll_no = "";
if(input){
data.name = input.name;
gs.addInfoMessage(data.name);
}
})();
In HTML your ng-model has a typo & you should not write ng-onClick like that. It should be c.functionName()
To learn more about Widget scripting please refer here.
If my answer helps then please mark it Helpful and Accept this solution.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 10:28 AM
Hello @vinithec22
Why not try creating a Catalog Item form or a Record Producer?
This approach ensures that the data is automatically saved on the server side.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 10:53 AM
i want to display records based on user input
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 10:53 PM
Hello @vinithec22
I noticed a small typo in your HTML code:
<input type="text" name="name" placeholder="Enter Your Name" ng-mode="c.data.name">
It should be ng-model, not ng-mode.
Here’s the corrected HTML code:
<div>
<h1>Check Your Attendance Details</h1>
<input type="text" name="name" placeholder="Enter Your Name" ng-model="c.data.name">
<input type="text" name="roll_no" placeholder="Enter Roll No" ng-model="c.data.roll_no">
<button ng-click="vis()">Submit</button>
<p>{{data.name}}</p>
<div>
Result:
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2025 11:21 AM
Hi there,
Try below:
HTML:
<div>
<h1>Check Your Attendance Details</h1>
<input type="text" name="name" placeholder="Enter Your Name" ng-model="c.data.name">
<input type="text" name="roll_no" placeholder="Enter Roll No" ng-model="c.data.roll_no">
<button ng-click="c.vis()">Submit</button>
<p>{{data.name}}</p>
<div>
Client Script:
api.controller=function($scope) {
/* widget controller */
var c = this;
c.vis = function(){
c.server.update();
alert(c.data.name);
}
};
Server Script:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
data.name = "";
data.roll_no = "";
if(input){
data.name = input.name;
gs.addInfoMessage(data.name);
}
})();
In HTML your ng-model has a typo & you should not write ng-onClick like that. It should be c.functionName()
To learn more about Widget scripting please refer here.
If my answer helps then please mark it Helpful and Accept this solution.
Thanks