how to make a upload form?

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Developers, Moderators

Post Reply
User avatar
blackstrip
Posts: 16
Joined: Tue Sep 10, 2013 10:45 pm

how to make a upload form?

Post by blackstrip »

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: Select all

$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????',
			),
	);
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: how to make a upload form?

Post by cigamit »

You can look at examples in include/global_form.php
'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'
),
User avatar
blackstrip
Posts: 16
Joined: Tue Sep 10, 2013 10:45 pm

Re: how to make a upload form?

Post by blackstrip »

cigamit wrote:You can look at examples in include/global_form.php
'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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest