Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jul 23, 2017 11:49 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: how to make a upload form?
PostPosted: Sat Jun 20, 2015 8:36 am 
Offline
User avatar

Joined: Tue Sep 10, 2013 10:45 pm
Posts: 16
Hi guys,

i want to make upload function to my plugins, the function is upload a config.cfg as router configuration to my server.
i already make a tab in settings page, and i know the form is an array.
how to using 'method' to make a upload button?

like this:
Code:
$temp = array(
      'upload_header' => array(
         'friendly_name' => 'Upload Configuration',
         'method' => 'spacer',
         ),
      'upload_button' => array(
         'friendly_name' => 'Upload config file',
         'description' => 'Upload config file',
         'method' => '????upload????',
         ),
   );


Top
 Profile  
 
 Post subject: Re: how to make a upload form?
PostPosted: Sat Jun 20, 2015 6:15 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2587
Location: B/CS Texas
You can look at examples in include/global_form.php

Quote:
'import_file' => array(
'friendly_name' => 'Import Template from Local File',
'description' => 'If the XML file containing template data is located on your local machine, select it here.',
'method' => 'file'
),

_________________
CactiEZ CD


Top
 Profile  
 
 Post subject: Re: how to make a upload form?
PostPosted: Sun Jun 21, 2015 10:33 am 
Offline
User avatar

Joined: Tue Sep 10, 2013 10:45 pm
Posts: 16
cigamit wrote:
You can look at examples in include/global_form.php

Quote:
'import_file' => array(
'friendly_name' => 'Import Template from Local File',
'description' => 'If the XML file containing template data is located on your local machine, select it here.',
'method' => 'file'
),


hi cigamit, thank you so mush, work fine.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group