Where and how to embed custom code

Where and how to embed custom code

Postby RGR204 » Sun Jan 03, 2016 5:03 am

I'm a new to nuBuilder en don't understand which type of code to embed in the several custom code tabs. I was trying to embed code to close the form after saving a record and return to the browse form. I get the message about json could not parse it. I found a post for this refering to the function nuSaveForm(true,2) but did not work for me. Why is there no better explanation on how to put which code and where to embed. I know enough about html, php and javascript to solve this type of issues but have no clue when and where to use javascript or php code.
Anybody help please.... :?:
RGR204
 
Posts: 4
Joined: Thu Dec 31, 2015 8:12 pm

Re: Where and how to embed custom code

Postby saultpastor » Sun Jan 03, 2016 2:35 pm

RGR,
I feel your pain, the learning curve is steep for me as well, but I'm picking up more all the time. I can say what others would say, read the wiki and watch the videos, over and over. read carefully, things seem to be stated only once in the wiki and not always in the most intuitive places, although as you learn more about how it works it makes more sense.

The nuSaveForm(true,2) function is used under the "extra action buttons". Make a button, call it save or save and return or whatever makes sense, and then put the code in the "javascript to run" box. The button it will appear at the top of the edit form.

Craig
saultpastor
 
Posts: 24
Joined: Sun Jul 19, 2015 3:34 am

Re: Where and how to embed custom code

Postby RGR204 » Sun Jan 03, 2016 9:53 pm

Hi Craig,

Thanks for your answer, and yes I 'm studying the documentation and the demo application to find out how things work. Looking at the video's is nice but more helpfull would be short examples in the in the Javascript and PHP section of the documentation.
RGR204
 
Posts: 4
Joined: Thu Dec 31, 2015 8:12 pm

Re: Where and how to embed custom code

Postby saultpastor » Wed Jan 06, 2016 12:39 pm

I have felt that same way several times. Problem is, if the developers are making documentation they are not developing, and they develop for their own use of the program and because they like to develop software, I imagine. Most have little use for documentation and little time to do it, but I'm sure they would welcome the help.

But, if you or I knew enough about the program to write users guides, we wouldn't be having this conversation. I guess we need to remember, that when we get proficient with it, to go back and contribute.

Craig
saultpastor
 
Posts: 24
Joined: Sun Jul 19, 2015 3:34 am

Re: Where and how to embed custom code

Postby admin » Mon Jan 11, 2016 2:57 pm

Thanks Craig.
admin
Site Admin
 
Posts: 3406
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5


Return to Custom Code