Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Change the value of a field in a subform string
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Change the value of a field in a subform string
How to change the value of a field in a subform line using the js button from the main form, knowing the line number and field number?
-
- nuBuilder Team
- Posts: 4297
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Change the value of a field in a subform string
Code: Select all
var row = 3;
$('#your_subform_id' + nuPad(row) + 'your_field_id').val('hello').change();
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Change the value of a field in a subform string
This does not work.kev1n wrote:Code: Select all
var row = 3; $('#your_subform_id' + nuPad(row) + 'your_field_id').val('hello').change();
Where to find descriptions of many js functions, in particular nuPad.
Code: Select all
function zapoln_is_ves(event) {
for (var i = 0; i <r.length-1; i ++) {
nuAddRow('sub_hodki');
$('#sub_hodki' + nuPad(i) + 'hod_kol').val('10').change();
}
}