holding POST data when preview a SAEF
Posted: 04 June 2007 03:57 PM   [ Ignore ]
Newbie
Rank
Total Posts:  4
Joined  2007-05-31

Hi Mitchell,

I get a strange occurrence when previewing my SAEF and using your file upload. In the preview it parses the full link to the file upload folder. (http://www.xxxxxx.com/ee/images/uploads/upload_file.gif) And the PHP I have to hold the post data in the form returns just the first portion of the src tag (<img src=)

Could you look at the code and see if you can see anything,

This is the form field

<input type="text" name="field_id_20" id="field_id_20" size="20" maxlength="1000"  value="<?php global $_POST; if (isset($_POST['field_id_20'])) echo $_POST['field_id_20']; ?>">
<
input type='hidden' name='field_ft_20' value='none' />

And here is the pop up link

I would think that instead of the link showing up it would show the image, and I can’t understand why it’s not holding the POST data in the field. Everything works fine if I don’t preview the post and just press submit. It sends me to the next page and the entry shows fine.

Here is a link to the page. Directory
If you don’t have the login information I gave you in the last discussion we had let me know and I’ll email it to you.

Thanks

Mike

Profile
 
 
Posted: 04 June 2007 04:21 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  702
Joined  2004-03-30

Mike,

First guess is that the quotation mark is stopping the PHP as that code thinks it’s reached the end of a string. Try using single quotes somewhere.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 04 June 2007 04:33 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  4
Joined  2007-05-31

POP UP LINK CODE

When I look at the source from the web browser for the preview page everything looks OK, The form field is showing the right data and the it’s the right path to the image upload folder.

<input type="text" name="field_id_20" id="field_id_20" size="20"  value="<img src="{filedir_1}upload_file.gif" style="border: 0;" alt="image" width="32" height="42" />">
<
input type='hidden' name='field_ft_20' value='none' />

Profile
 
 
Posted: 04 June 2007 04:43 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  4
Joined  2007-05-31

I was just playing around with that heres what made it work

<input type="text" name="field_id_20" id="field_id_20" size="20"  value='<?php global $_POST; if (isset($_POST['field_id_20'])) echo $_POST['field_id_20']; ?>' />
<
input type='hidden' name='field_ft_20' value='none' />

I have the template set to allow html in weblogs, I’m not sure why the image link would not be showing the image. After I submit the form it works fine.

I see it know, the page is processing the image preview without the <img src tag. Where as in the submit return it is placed with the tag. 

Thanks,

Profile
 
 
Posted: 04 June 2007 05:54 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  702
Joined  2004-03-30

So it’s working for you now?

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 04 June 2007 06:06 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  4
Joined  2007-05-31

Yes, I just wrapped the preview post data in a img tag.

<img src="{logo}"/>

I didn’t have to anywhere else because once the form is submitted I can use the {logo} custom field tag freely. I guess I could have echoed the post in the preview table instead of using the tag. Oh well it’s’ all the same.

Thanks

Mike

Profile