Hi everyone!
I used this FAQ to do a form, but I don´t know how I can add upload files.
My code:
In File Uploads action I put:
recipient[1][file]:pdf-cdr-psd-ai-in,recipient[2][file]:pdf-cdr-psd-ai-in,recipient[3][file]:pdf-cdr-psd-ai-in
I tested too:
recipient_1_file:pdf-cdr-psd-ai-in,recipient_2_file:pdf-cdr-psd-ai-in,recipient_3_file:pdf-cdr-psd-ai-in
But the upload is not working.
What I´m doing wrong?
I used this FAQ to do a form, but I don´t know how I can add upload files.
My code:
<?php
// set the total count
$count = 30;
for ( $i = 1; $i <= $count; $i++ ) {
// add classes which will let us identify the inputs to hide
if ( $i == 1 ) {
$class = 'show_me';
} else {
$class = 'hide_me';
}
// add the 'Add one' buttons (but not to the last set)
if ( $i < $count ) {
$j = $i+1;
$button = "<div><input type='button' name='addone_{$j}' id='addone_{$j}' value='+ Adicionar' class='add_one' /></div>";
} else {
$button = "";
}
// add the inputs with a little ChronoForms styling
echo "<div id='recipient_{$i}' class='{$class}' >
<div class='multiline_start'>
<label>Item</label>
<select size='1' name='recipient[{$i}][item]' id='recipient_{$i}_item'>
<option value>Selecione...</option>
<option value='item1'>Item 1</option>
<option value='item2'>Item 2</option>
<option value='item3'>Item 3</option>
</select>
</div>
<div class='multiline_add'>
<label>Quantity</label>
<input type='text' size='6' name='recipient[{$i}][qtd]' id='recipient_{$i}_qtd' />
</div>
<div class='multiline_add'>
<label>File</label>
<input type='hidden' name='recipient[{$i}][file]' value='' alt='ghost'>
<input type='file' name='recipient[{$i}][file]' id='recipient_{$i}_file'>
</div>
<div class='clear' ></div>
{$button}
</div>";
}
?>
In File Uploads action I put:
recipient[1][file]:pdf-cdr-psd-ai-in,recipient[2][file]:pdf-cdr-psd-ai-in,recipient[3][file]:pdf-cdr-psd-ai-in
I tested too:
recipient_1_file:pdf-cdr-psd-ai-in,recipient_2_file:pdf-cdr-psd-ai-in,recipient_3_file:pdf-cdr-psd-ai-in
But the upload is not working.
What I´m doing wrong?
Hello cesarvelame,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a file upload to my form?
How can I have a button to add more form inputs?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a file upload to my form?
How can I have a button to add more form inputs?
P.S: I'm just an automated service😉
I forgot to say that the add more button is working well. Just the file upload is not working.
This topic is locked and no more replies can be posted.