Hi Guys,
I tried many times to put a Grid Field form in my frontend EE where i can upload image like below with no success :
{exp:channel:form channel="contact" return="form/ENTRY_ID" entry_id="{segment_3}” error_handling=”inline” dynamic_title=”[info]” include_assets=”no” unique_url_title=”yes”}
name : {field:name} message : {field:message} photo : {field:photo}
<input type=”submit” value=”Submit”>
{/exp:channel:form}
As you can see here, my “{field:photo}” type is a File Grid, and how you guys do normally ?
And can you show me your codes form for Input Uploading File and Output Displaying File (photo) please ?
Regards.
In the channel form, the file grid should display and function like a standard grid, so you can’t drag and drop a collections of images and populate multiple rows, but you should be able to add rows just like a normal grid.
I just tested using {field:file_grid_name} and it worked as expected.
Is that what’s happening on your end? And if so, when you save, if you go edit in either the CP or the form, do you see the images you uploaded?
Hi Robin,
Thank you for your help, my {field:file_grid_name} is {field:photo}
I create or add an entry via outside CP, i mean on frontend, like this below :
Step 1 : On frontend, when i add an entry, it shows like below which is strange : **
Step 2 : On frontend, if i don’t fill any datas on those fields, i click directly on Submit button, it displays this : **
Step 3 : On frontend, after clicked on Submit button, i can add several images, which will be like this : **
So as you can see, do you know why on Step 1 displays like that ?
PS : There is also another problem on Step 3, that i cannot Remove File by clicking on it. Do i miss an EE code somewhere ?
Regards.
Hi Rob,
Sorry disturbing you again and again :p
I forgot to implement this with my File Grid in question below, you know how to implement it please ?
prev_row :
{gallery:prev_row} Previous photo {/gallery:prev_row}
next_row :
{gallery:next_row} Next photo {/gallery:next_row}
It would be great if EE can put some 1 or 2 examples live where we can see how it works here : https://docs.expressionengine.com/latest/fieldtypes/grid.html
Regards.
You’re right, I had to experiment a bit to pin it down. I’ll write up an example of paginating. In the meantime, see if this helps (note I hard coded the entry_id).
If you’re not sure about why I did something like I did, just ask.
{exp:channel:entries channel="blog" entry_id="20" dynamic="no"}
<h3>{title} - {entry_id}</h3>
{gallery row_id="{segment_3}" limit="1"}
{gallery:file}
{gallery:prev_row}
<a href="http://{path=">Previous photo</a>
{/gallery:prev_row}
{gallery:next_row}
<a href="http://{path=">Next photo</a>
{/gallery:next_row}
{/gallery}
{/exp:channel:entries}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.