EllisLab text mark
Advanced Search
     
I need to add value=”{my_field_name}” to {field:my_field_name}
Posted: 01 July 2012 06:44 AM   [ Ignore ]
Joined: 2012-03-15
13 posts

This question may be related to a resolved thread.

Hi,


Which the type should I put.

When I put type=“safecracker_file” not work

and if I put type=“file” not work

I need to add value=”” to cache the link of the file when any error reload the page and the user has not to write it again.

or any solution to add value=”{my_field_name}” to {field:my_field_name}

Thanks

 
Posted: 01 July 2012 05:32 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-03-15
13 posts

Another proplem: when safecracker file is required I get error, when it not required it working good !!??

 
Posted: 03 July 2012 11:28 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey alnaseej,

I am sorry to hear you are running into this problem.

Can you show me how you are building this form and calling the safecracker field?

I can take what you give me and change it to work for you and explain what I did to accomplish that. Might be the quickest way to get you up and running.

Thank you,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 03 July 2012 12:32 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2012-03-15
13 posts

Thanks:

{exp:safecracker channel="jobs" return="jobs/thankyou" error_handling="inline"}

<label for="jobs_logo"><span>*</spanjobs_logo </label>

{if error:jobs_logo}<h2>* add jobs_logo</h2>{/if}

{field
:jobs_logo}


<br />
   <
input type="submit" class="jobs_submit" value="Submit">

{/exp:safecracker} 
 
Posted: 05 July 2012 11:47 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey alnaseej,

I am not seeing where you call the file field.

Can you show me that?

Thank you,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 05 July 2012 04:44 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2012-03-15
13 posts

{field:jobs_logo}

 
Posted: 05 July 2012 04:52 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey alnaseej,

I see. Unfortunately you cannot use the short form to get the results to stick around.

If you use the long form and then put the field name in the value then after an error, the values should stick around.

Also, forgot to address the second question. That is a know bug.

When submitting an entry via SaferCracker with a SafeCracker File field, the required parameter or channel field preference will ignore if a file has been chosen and the sumission will fail with the error: The {field-name} field is required.

Sorry about that one, I know it’s a pain, but they are working on it. You can comment on the bug to stay up to date on it’s progress.

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade

 
Posted: 05 July 2012 05:17 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2012-03-15
13 posts

Thanks,

Please give me example of long form. How can I write it.

I searched a lot and get only


{custom_fields}
{if safecracker_file}
          {display_field}
{/if}
{/custom_fields}

and it is the same.

Very thanks

 
Posted: 06 July 2012 02:59 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey alnaseej,

I am pretty sure that you will have to re enter the safecracker field, but other fields like text areas and such should keep their values.

Does that make sense?

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade