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.
Add 2 icon fields to each row to the browse/search form
-
- Posts: 58
- Joined: Mon Sep 09, 2019 8:20 am
Add 2 icon fields to each row to the browse/search form
Hi my name is Daniele i'm a new user of nuBuilder.
Is it possible to insert 2 fields with 2 icons (edit and next) to each line of the browse form?
Clicking on the edit icon I would like to open the edit form of that record, while clicking on the next icon I would like to open a new browse form with the data of a new table linked with one to many relation to the record selected in the first browse form
One more question, when I edit a record and click on the save button the page remains the same, how do I automatically return to the browse form after pressing the save button?
I tried to load the corso.zip file in phpmyadmin the file is not loaded. the page load wheel turns infinitely I waited for more than an hour without success.
should the file be uploaded to a new database?
Daniele
Is it possible to insert 2 fields with 2 icons (edit and next) to each line of the browse form?
Clicking on the edit icon I would like to open the edit form of that record, while clicking on the next icon I would like to open a new browse form with the data of a new table linked with one to many relation to the record selected in the first browse form
One more question, when I edit a record and click on the save button the page remains the same, how do I automatically return to the browse form after pressing the save button?
I tried to load the corso.zip file in phpmyadmin the file is not loaded. the page load wheel turns infinitely I waited for more than an hour without success.
should the file be uploaded to a new database?
Daniele
Re: Add 2 icon fields to each row to the browse/search form
Daniele,
You can add whatever columns you want to a Browse Form and add your own icons.
You can change what happens when you click a Browse record by modifying nuSelectBrowse() in the Javascript section of a Form.
https://wiki.nubuilder.cloud/ ... lectBrowse
Steven
You can add whatever columns you want to a Browse Form and add your own icons.
You can change what happens when you click a Browse record by modifying nuSelectBrowse() in the Javascript section of a Form.
https://wiki.nubuilder.cloud/ ... lectBrowse
Steven
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Add 2 icon fields to each row to the browse/search form
Does it work if you unzip it and upload the SQL file?calida82 wrote:Hi I tried to load the corso.zip file in phpmyadmin the file is not loaded. the page load wheel turns infinitely I waited for more than an hour without success.
should the file be uploaded to a new database?
Daniele
Upload it to an existing nuBuilder DB.
-
- Posts: 58
- Joined: Mon Sep 09, 2019 8:20 am
Re: Add 2 icon fields to each row to the browse/search form
Hi steven can you tell me how to add columns and icons? or show me some examples where I can see it?
On the web is there a complete application made with nuBuilder (of any kind) that i can download and study?
kev1n I tried also pulling out the .sql file and loading that directly but it doesn't work. the wheel turns at infinity.
I had already tried in a nuBuilder db.
I have another problem, with phpmyadmin I created 2 db and in the folder / var / www / html / I extracted nuBuilder in 2 separate folders and configured the file nuconfig.php to point everyone to his db but when I open the first app everything is ok , when I try to point to the second folder the name of the app changes but the app is that of the first folder.
On the web is there a complete application made with nuBuilder (of any kind) that i can download and study?
kev1n I tried also pulling out the .sql file and loading that directly but it doesn't work. the wheel turns at infinity.
I had already tried in a nuBuilder db.
I have another problem, with phpmyadmin I created 2 db and in the folder / var / www / html / I extracted nuBuilder in 2 separate folders and configured the file nuconfig.php to point everyone to his db but when I open the first app everything is ok , when I try to point to the second folder the name of the app changes but the app is that of the first folder.
Re: Add 2 icon fields to each row to the browse/search form
calida82,
I suggest you learn how nuBuilder works before trying to reinvent the wheel.
BUT this is how you add another column in a Browse Form. How you add icons is up to you, probably with Javascript.
https://wiki.nubuilder.cloud/ ... Subform.29
To your second question - you can find some simple apps here... https://www.nubuilder.com/downloads
To your third question - you can only have 1 nuBuilder App running in a browser at once time.
Steven
I suggest you learn how nuBuilder works before trying to reinvent the wheel.
BUT this is how you add another column in a Browse Form. How you add icons is up to you, probably with Javascript.
https://wiki.nubuilder.cloud/ ... Subform.29
To your second question - you can find some simple apps here... https://www.nubuilder.com/downloads
To your third question - you can only have 1 nuBuilder App running in a browser at once time.
Steven
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Add 2 icon fields to each row to the browse/search form
I have made the experience that several nuBuilder run at the same time without issues known to me. But after the installation I had to clear the cache and close the browser, otherwise data was loaded from the wrong DB.admin wrote:
To your third question - you can only have 1 nuBuilder App running in a browser at once time.
Steven
-
- Posts: 58
- Joined: Mon Sep 09, 2019 8:20 am
Re: Add 2 icon fields to each row to the browse/search form
BUT this is how you add another column in a Browse Form. How you add icons is up to you, probably with Javascript.
https://wiki.nubuilder.cloud/ ... Subform.29
[/quote]
Hi, nuBuilder could be a very powerful tool but it has a big flaw ... The documentation is little and you have to be in it to understand everything.
I followed the link you gave me and it is not explained how to add a column. Every single parameter is explained, too bad that it is not explained how it interacts with the rest. I added my column in the browse module options, in the last place I inserted the values for the new column. when I launch the application the column is there, but the module is no longer connected to the database ... where before I had 10 records is now empty. I remove the column and the records come back.
https://wiki.nubuilder.cloud/ ... Subform.29
[/quote]
Hi, nuBuilder could be a very powerful tool but it has a big flaw ... The documentation is little and you have to be in it to understand everything.
I followed the link you gave me and it is not explained how to add a column. Every single parameter is explained, too bad that it is not explained how it interacts with the rest. I added my column in the browse module options, in the last place I inserted the values for the new column. when I launch the application the column is there, but the module is no longer connected to the database ... where before I had 10 records is now empty. I remove the column and the records come back.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Add 2 icon fields to each row to the browse/search form
When you add a new column, its field (title) must exist in the db. If it doesn't, the generated sql will result in an error when executed and you'll see a blank screen.
You could simply use the primary key of the table for the additional columns.
I recorded a video that shows how to add two additional columns and add icons to a column using javascript.
https://streamable.com/sfs7z
Javascript used in the example:
You could simply use the primary key of the table for the additional columns.
I recorded a video that shows how to add two additional columns and add icons to a column using javascript.
https://streamable.com/sfs7z
Javascript used in the example:
Code: Select all
if (nuFormType() == 'browse') {
$('[data-nu-column="0"]').each(function (index) { // 1st column
var cellId = $(this).attr('id');
$('#' + cellId).html('<img src="graphics/select.png" alt="select" ">');
this.onclick = function() { alert('clicked!'); };
});
}
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Add 2 icon fields to each row to the browse/search form
This can by done by adding this code to the form's JS field:calida82 wrote: One more question, when I edit a record and click on the save button the page remains the same, how do I automatically return to the browse form after pressing the save button?
Code: Select all
if (nuFormType() == 'edit') {
var l = window.nuFORM.breadcrumbs.length;
if (l > 1) {
nuGetBreadcrumb(l - 2);
}
}
-
- Posts: 58
- Joined: Mon Sep 09, 2019 8:20 am
Re: Add 2 icon fields to each row to the browse/search form
Hi thanks for the answer I tried and it works. but there is a way to add the icon only where there are records? in this way he adds it to all the lines even if there are no records.
to open a new form I can use nuForm (nuGetProperty ('form_id'), r, '', '', '0', '1'); ?
to open a new form I can use nuForm (nuGetProperty ('form_id'), r, '', '', '0', '1'); ?