Jump to content
Sign in to follow this  
StrikeOutXXX

Editing using textarea

Recommended Posts

Greetings all,

I was tasked with converting our FM5 server over to 8. The files went fine, but trying to replicate what some older webcompanion files were doing through custom web publishing is giving me some trouble. I see this is a popular question on the web, but I work in a school, and don't subscribe to the pay sites, so hoping you could help. Everything I've done so far is pretty much out of the box.

Converted the files to .fm7 ran the files through the Filemaker Site Assistant. Modified the html portions of the xsl files to make them look pretty and whatnot. Everything works as desired to this point with the exception of the editrecord.xsl file when editing large fields (course description for this example). For the add record part, I changed the default text box to textarea, and initial entry works fine. When it comes to editing, I'm stuck with the 1024 character limit with the default one line input box for editing.

This is what the old webpage looked like for this particular field wiht FM5:

Course Description:

[FMP-Field: Course Description]

And of course, for the same field in FM8:

Course Description:


Course Description()

In testing, I can add the textarea here, but it's blank and if they save the record with a blank box overwrites what was entered at add entry. I added a display field for what is currently in the field so they can copy/paste into the textarea and edit, but if they're editing another field and don't think to do this, they wipe out the entry.

Thanks for any help you can give.

Jeff

Share this post


Link to post
Share on other sites

A textarea in HTML is a textarea in XML/XSLT (because it's HTML : ) The "value" of the textarea element goes between the start and end tags. The "size" of the textarea is the rows and columns.



the stuff goes here



There is NO 
...

Remember to not include any extra spacing (tabs or spaces) between the textarea tags, as these *will* be picked up by the browser as "something"!

Share this post


Link to post
Share on other sites

Thanks Beverly. I can create the actual textareas in the addentry page to populate the data initially. I can also create textareas on the edit page. Where I am having trouble is populating the textarea with the data already entered previously to be able to edit it. This creates a blank textarea, so if the user saves the record while in edit mode, that blank textarea overwrites the data that is there already (that I can't get to populate). I can not get the already existing "Course Description" value to populate itself to be edited (or if they don't want to edit that field, simply re-save when they hit the save button). Here's where I'm at now.

Course Description Test 1:


Course Description()

(I cut and paste, but for some reason some of the closing ">'s" get converted to "& gt;"

Thanks a lot - what's funny is googling this issue, I have found the same problem for Ruby, ASP, and a few others, seems what was easy to do 10 years ago is suddenly a major pain.

Thanks!

Jeff

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.