[eluser]edziffel[/eluser]
Am trying to pass attributes using an array with form_upload. The bare bones of it works.
Read the user guide where they the example shows an $data array to pass the arguments. However I am using $data arrays for page titles, headers and what have you.
Code:
function db_upload_form()
{
$data['title']="Database Upload Form";
$data['heading']="Click Browse to select CSV File to upload";
$data['directions']="Click Upload after selecting file";
/*$data=array('action'=> 'db_upload_post_to_view');*/
$this->load->view('db_upload_form_view',$data);
}
The commented out line is one of my many attempts to pass an attribute to the form_upload function.
Am not married to the many $data arrays but does allow for a user friendly to change things.
Code for db_upload_form_view.php
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title><?php echo $title;?></title>
</head>
<body>
<?php echo $heading."<br/>"; ?>
<?php echo $directions."<br/>"; ?>
<?php echo form_upload(); ?>
</body>
</html>
Yeah the argument section of form_upload, (), is blank at the moment because that way for the moment it is working. Shows the title, heading, directions and just/only a small text box and a browse button.
What do I need to do to pass the proper attributes to the function to get things like a submit button to work? Is there a way to make the included text box large enough to be able to show the entire URL before submitting? Is there a way to change the text on the browse button?
Thanks