Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
FormAPI
System
Hi,
Is there any way to get below variables using form api.
my $form_name = $cgi->{'form'}{'iw_form_name'};
my $element_name = $cgi->{'form'}{'iw_callback_var'};
my $user_name = $cgi->{'form'}{'user_name'};
my $item_name = $cgi->{'form'}{'iw_item_name'};
my $item_description = $cgi->{'form'}{'iw_item_description'};
my $dcr_name = $cgi->{'form'}{'iw_object_name'};
my $init_value = $cgi->{'form'}{'iw_item_value'};
Bcz above variable i am using in my callout but now i want to call same prg with callServer.So i want to pass above variables through param object.
with callServer i am seeing all above variables as blanks.
Thanx in advance
Find more posts tagged with
Comments
Migrateduser
iw_form_name
There is no method that returns the name of the datacapture form. However, you could use the constant "window.opener.top._dcWin.formframe.document.dcreditForm". It's unsupported, but relatively safe...
iw_callback_var
There isn't a good way to get this value. I guess the closest thing to this is the name of the item you're interested in passing to the callout (IWItem.getName()).
user_name
IWDatacapture.getUser();
iw_item_name
Same as iw_callback_var.
iw_item_description
There isn't a call to get the description of an item.
iw_object_name
There is no way to get this value directly. You can call IWDCRInfo.getDCRName() and strip off the data-relative path so that you're left with just the dcr name.
iw_item_value
This is just the value in the item, or item.getValue().
--Daniel
Migrateduser
Thanx for your reply
Is it possible to get system date in FormAPI ?
Thanx in advance
Edited by krishna1288 on 06/12/03 08:36 AM (server time).
Migrateduser
If you want the server date I think you may have to use an inline (or search the web for something like JavaScript server date). If you want the client date I think use something like:
var today = new Date();
or maybe something like:
//----------------------------------------------------------------------
// Return a string representing today's date plus the specified number
// of days (0 to get today). Used to default values without
// relatively expensive inline calls.
//
// if ( IWDCRInfo.getDCRName() == null || IWDCRInfo.getDCRName() == undefined || IWDCRInfo.getDCRName() == "" )
// {
// IWDatacapture.getItem( "/Date" ).setValue( getDate( 0 ));
// }
//----------------------------------------------------------------------
function getDate( number )
{
today = new Date();
today.setDate( today.getDate() + number );
return(( today.getMonth() + 1 ) + "/" + today.getDate() + "/" + today.getYear());
}
document_types_error.jpg
aces
If I want to get var iw_callback_var, you stated that it is Item.getName(). Is this the right syntax?
var iw_callback_var = IWItem.getName();