title field not populating on edit page
Posted: 02 December 2010 02:25 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

Hi,

I’m using SafeCracker to build edit pages for entries on a membership site.  On one particular form, the entry title field is not populating. All of the other fields are populating just fine.  I’m not sure what I’m doing wrong.  No doubt, I’m missing something simple. Any help you could give would be great. Here is my code:

{exp:safecracker channel="cafe_video" return="index.php/cafe/member_video/{author_id}" entry_id="{segment_3}"}
    
<label for="title"><h4>Title</h4></label>
    <
input type="text" name="title" id="title" value="{title}" size="50" maxlength="100">

    <
br />
    <
h4>The YouTube or Vimeo URL for this video:</h4>
    <
input type="text" name="cafe_video" id="cafe_video" value="{cafe_video}" size="80" maxlength="100" /><br />
    <
h4>Video Description:</h4>
    <
textarea id="{video_description}" name="{video_description}" dir="{text_direction}" cols="60" rows="8">{video_description}</textarea><br />
    <
p><input type="checkbox" name="allow_comments" value="y" {allow_comments} /> Allow Others to Respond?</p>

    <
input type="submit" name="submit" value="Submit" />

{/exp:safecracker} 

Here is my EE info:

System Info
EE Info
ExpressionEngine   2.1.1 Build 20101020
MSM   not installed
Extensions   installed
jQuery   1.4.2
MySQL   5.0.91-community-log
Server   Apache/2.2.16 (Unix) mod_ssl/2.2.16 OpenSSL/0.9.8e-fips-rhel5 mod_fcgid/2.3.5 Phusion_Passenger/2.2.15 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
EE Stats
Sites   1
Channels   11
Entries   53
Comments   15
PHP Info
version   5.2.14
register_globals   off
safe_mode   off
max_execution_time   300
upload_max_filesize   10M
max_input_time   60
memory_limit   64M
session_save_path   writable
Browser Info
Browser   Chrome 7.0.517.44
Platform   Mac OS X
Add-Ons
Modules
Blacklist 3.0
Blogger Api 2.0
Comment 2.1
Email 2.0
Emoticon 2.0
Ip To Nation 2.2
Jquery 1.0
Mailinglist 3.0
Friends 1.5.0
Moblog 3.0
Pages 2.0
Query 2.0
Rss 2.0
Referrer 2.0
Search 2.0
Simple Commerce 2.0
Updated Sites 2.0
Wiki 2.1
Channel 2.0.1
Member 2.0
Stats 2.0
User 3.2.3
Navee 1.2.5
Mountee 1.0
Safecracker 1.0.0
Freeform 3.0.3
Iexpression 1.4
Code Pack 1.1.0
Low Reorder 1.0.3
Like 1.0
Extensions
User 3.2.3
Mx Title Control 2.0.4
First Timer 2.0.1
Cp Analytics 1.0.1
Safecracker 1.0.0
Sc Publish Redirect 1.0.1
Friends Code Pack 1.1.0
Accessories
Cp Analytics 1.0
Template Variables 1.1
Health Check 0.1.0
Field Types
select 1.0
text 1.0
textarea 1.0
date 1.0
file 1.0
multi_select 1.0
checkboxes 1.0
radio 1.0
rel 1.0
bbr_ckeditor 1.0.2
safecracker_catchall 1.0.0
safecracker_file 1.0.0
low_reorder 1.0.3
wygwam 2.0.3

[ Edited: 02 December 2010 02:32 AM by wbboyd ]
Profile
 
 
Posted: 02 December 2010 03:34 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Do you have more than one SC on this page/template? Is this when you’re editing an existing entry or creating a new one? If you put {title} elsewhere in the form (not in a form value) does it print out?

Just to clean up your template a bit (you dont need curly braces around input id/name:

{exp:safecracker channel="cafe_video" return="index.php/cafe/member_video/{author_id}" entry_id="{segment_3}"}
    
<label for="title"><h4>Title</h4></label>
    <
input type="text" name="title" id="title" value="{title}" size="50" maxlength="100">

    <
br />
    <
h4>The YouTube or Vimeo URL for this video:</h4>
    <
input type="text" name="cafe_video" id="cafe_video" value="{cafe_video}" size="80" maxlength="100" /><br />
    <
h4>Video Description:</h4>
    <
textarea id="video_description" name="video_description" dir="ltr" cols="60" rows="8">{video_description}</textarea><br />
    <
p><input type="checkbox" name="allow_comments" value="y" {allow_comments} /> Allow Others to Respond?</p>

    <
input type="submit" name="submit" value="Submit" />

{/exp:safecracker} 
Profile
 
 
Posted: 02 December 2010 03:39 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

It is the only SC form on the page.

Also, it is an edit form, not an entry form, so I’m editing an existing entry.  When I put {title} in the page, it shows up fine, but it doesn’t show in the title field of the form.  All of the other fields populate correctly. 

On other forms elsewhere on my site, the title field populates correctly.

Profile
 
 
Posted: 02 December 2010 03:40 AM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

If you load the page and view the source, does the title show up correctly in the form input value there?

Profile
 
 
Posted: 02 December 2010 03:41 AM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

yes it does.

Profile
 
 
Posted: 02 December 2010 03:42 AM   [ Ignore ]   [ # 5 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

OK, so it sounds like something is happening in javascript to wipe that field out, that’s the only explanation I can think of. You can try momentarily turning off javascript in your browser to confirm.

Profile
 
 
Posted: 02 December 2010 03:45 AM   [ Ignore ]   [ # 6 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

I disabled JavaScript and refreshed.  Nothing changed.

Profile
 
 
Posted: 02 December 2010 03:46 AM   [ Ignore ]   [ # 7 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

Also, I’ve been working in Chrome.  I just tried Firefox and I get the same results.

Profile
 
 
Posted: 02 December 2010 03:46 AM   [ Ignore ]   [ # 8 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Is there a public url I can visit? You can send me a PM If you like.

Profile
 
 
Posted: 02 December 2010 03:51 AM   [ Ignore ]   [ # 9 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

just pm’d you

Profile
 
 
Posted: 02 December 2010 03:54 AM   [ Ignore ]   [ # 10 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

I get it now, there are quotation marks in the title, which is causing the HTML to screw up. Try using single quotes around your title input value attr:

<input type="text" name="title" id="title" value='{title}' size="50" maxlength="100"
Profile
 
 
Posted: 02 December 2010 03:57 AM   [ Ignore ]   [ # 11 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-08-30

Ahhhh…...sorry to bother you.  Thanks for the help.  That worked just fine.

Profile
 
 
Posted: 02 December 2010 03:57 AM   [ Ignore ]   [ # 12 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

No worries, glad to help smile

Profile