Welcome to the nuBuilder forums!

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

Open new form

Post Reply
forgot
Posts: 42
Joined: Thu Aug 09, 2012 8:52 pm

Open new form

Unread post by forgot »

Hello.

Is it possible open new form in corrent window from javascript? New form have to open directly in data view without show browse state.

--
Maxim
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: Open new form

Unread post by zazzium »

openForm(pFormID, pRecordID)

Be sure to check wiki
http://wiki.nubuilder.com/tiki-index.ph ... pRecordID_
forgot
Posts: 42
Joined: Thu Aug 09, 2012 8:52 pm

Re: Open new form

Unread post by forgot »

Thank you. Works

I start using openForm(pFormID, pRecordID);

For sample openForm("1506d32d1cbea5", "1506d34ed868b4");
where "1506d32d1cbea5" - form ID - I get it from mySQL
"1506d34ed868b4" - new ID for record.
I open new form only for input some data, not for open existing DB record.

And I find some issue.
For my form Default SQL Statement for dropdown doesn’t work.
I copy properly worked dropdown from other form.

--
Maxim
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: Open new form

Unread post by zazzium »

if u want to insert a new record with openForm use -1 for the id ( openForm("1506d32d1cbea5", "-1");)
and if u need the forms id u dont need to search it from the database, just open the form, and u can get the id from the url (..f=the_form_id...)

if u use -1 id for a new record, the Default SQL problem should be resolved.
forgot
Posts: 42
Joined: Thu Aug 09, 2012 8:52 pm

Re: Open new form

Unread post by forgot »

It helps.

Thank you!
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Open new form

Unread post by admin »

You can also get the zzsys_form_id from the url eg. &f=1506d32d1cbea5

Steven
Post Reply