XUpload - Custom Post Variable in files_list

Posts: 2
Joined: Nov 07, 2008 11:26 pm

Custom Post Variable in files_list

#1 Postby zoiddb » Nov 07, 2008 11:34 pm

hello, i have successfully added another input field next to the description input field in files_list. I also edited the post.php file however i can not figure out why the variable is not posting (i suppose the link is constructed in another location...?)

these are my modification in the xupload.js and seem to work fine. (the field added is called "chapter")

var new_row_descr = document.createElement( 'input' );
new_row_descr.type = 'text';
new_row_descr.name = element.name+'_descr';
new_row_descr.setAttribute('maxlength', 128);

//added chapter field
var new_row_chapter = document.createElement( 'input' );
new_row_chapter.type = 'text';
new_row_chapter.name = element.name+'_chapter';
new_row_chapter.setAttribute('maxlength', 4);
//added chapter end

var div2 = document.createElement( 'div' );
div2.className = 'xdescr';
div2.appendChild( document.createTextNode('Description:') );
//added chapter field
var div3 = document.createElement( 'div' );
div3.className = 'xchapter';
div3.appendChild( document.createTextNode('Chapter:') );
//added chapter end

div2.appendChild( new_row_descr );
//added chapter field
div3.appendChild( new_row_chapter );

new_row.appendChild( div2 );
//addded chapter field
new_row.appendChild( div3 );

Posts: 2
Joined: Nov 07, 2008 11:26 pm

#2 Postby zoiddb » Nov 07, 2008 11:35 pm

add in the post.php file

print "<br>File Chapter:".$_POST["file_chapter"][$i];

Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests