Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Where and how to embed custom code

Post Reply
RGR204
Posts: 4
Joined: Thu Dec 31, 2015 11:42 am

Where and how to embed custom code

Unread post by RGR204 »

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.... :?:
saultpastor
Posts: 39
Joined: Sat Jul 18, 2015 8:04 pm

Re: Where and how to embed custom code

Unread post by saultpastor »

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
RGR204
Posts: 4
Joined: Thu Dec 31, 2015 11:42 am

Re: Where and how to embed custom code

Unread post by RGR204 »

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.
saultpastor
Posts: 39
Joined: Sat Jul 18, 2015 8:04 pm

Re: Where and how to embed custom code

Unread post by saultpastor »

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
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Where and how to embed custom code

Unread post by admin »

Thanks Craig.
Post Reply