Jump to content

This topic is 7919 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

I was wondering if it is possible to add styled text (underline, bold, italic) to a Filemaker Unlimited database using a custom web page "add" format file. Or, is it only possible to send plain text through a web form? I would like our contributers to be able to enter their own written text directly into the DB but fear that all styles will be lost.

Thank You

Posted

Unable,

Thank you for your response. Well, I cannot get past the fact that whenever I place text in a form field on the web page all styles are stripped out. I thought I would ask people who had been there before I started a time consuming trial and error approach. My thinking is going along these lines: is it possible to place tags, html or something else, in the inputted text and have Filemaker interpret these as styles? I do not know and have been unable to find any info on the issue via web searches of pertinent sites.

Again Thanks,

Darryl

Posted

Yes, HTML should eschew complex formatting. But surely it allows italics and underline when needed. There are HTML tags for this. We are not talking about email which, I agree, should ideally be in plain text. But HTML does allow basic styles and all I need to know is how to get styled text into Filemaker via a CDML web form. Filemaker itself will publish styled text as HTML if I use [Field: Fieldname, Format] as I found out last night while seaching this list. So, does anyone have an answer to my initial question? Is it possible, or not possible, to send styled text to Filemaker via a web form field in CDML format file?

Thank You,

Darryl

Posted

"But HTML does allow basic styles and all I need to know is how to get styled text into Filemaker via a CDML web form."

HTML allows basic styles to be hard-coded into format files. It does not allow the client to set styles, fonts or sizes as one would in a text document or a db file.

I just wrote the above in a text document with Italics and Bold Face. I copied and pasted it into the text field which formats this answer. It pasted in as plain text.

Neither can I highlight a word here and make it Italic or Bold Face as I would in a text document or a db file. HTML code does not allow for that.

The problem is not with FileMaker, it is with HTML code.

Posted

if you need some "style" in your text then style your layout......HTML can be style for looks when you make html files...entry into FM is always plain txt.

Posted

RE: >entry into FM is always plain txt

Generally speaking it has nothing to do with FM.

Web is just like that.

We are trying to tell you that all the time.

And you can say, that all inputs in whole Internet is going to any database, inclusive of FM as *text only*.

If you will put the HTML formatting into text, that can be entered to FM text field and then serve back to the web with RAW format and then you can have the formatting.

Posted

smile.gif....u can input the html as well if you like to generate "dynamic html" by inserting html tags...if that is something you are after but then again html tags are...txt

and the ultimate answer is "It depends how you look at it" laugh.gif

If u need to show "styled text" for users while they are inputing something you can use some CSS so their entry will "look" styled (italics,bold,spaced...etc.) but you record it and display it how you like.

Posted

>u need to show "styled text" for users while they are inputing something you can use some CSS so >their entry will "look" styled (italics,bold,spaced...etc.) but you record it and display it how you like.

Hi again,

No, what I need to be able to do is have formatted text entered into a web page which then shows up in Filemaker with formatting intact. This way contributers can upload there writing, as is. Then, when i get Filemaker to pulish the field with the formatted text, said text will appear on the web with its (basic) formatting intact. I am mainly interested in reatining italics and bold. If this is impossible I will have them send me word files which I will then cut and paste directly into a database. this will maintain formatting but the contributers will not be able to upload and revise as they like (at least not without my help). I hope this is a bit more clear.

Darryl

Posted

"No, what I need to be able to do is have formatted text entered into a web page which then shows up in Filemaker with formatting intact"

But that is what Anatoli said, "...put the HTML formatting into text, that can be entered to FM text field and then serve back to the web with RAW format and then you can have the formatting."

So if your clients can be relied upon to insert <B></B> and <I></I> appropriately to get the "mainly ... bold and italic" formatting in HTML, then do as Anatoli said.

Posted

I vote Darryl as "the most persistent person in ignoring how the web forms really works" smile.gif

Darryl, until you figure out, how to enter the rtf format with formatting strings/characters into just text forms and then how to convert that received pure text strings into internal FM formatting strings/characters you have no chance.

Posted

Anatoli,

I am not asking the impossible, I am asking if something is possible or not. You have given me two answers (and I thank Unable for pointing out the first one which I missed upon first reading). First, you say I can include HTML tags (<b></b>) in the uploaded text and use RAW formatting to get Filemaker to publish it as styled text. Second you say web forms cannot handle styles in any way and that I am somewhat misguided to think that they might. I will try the first suggestion. If it does work for me I will be very happy. If it doesn't I move on to Plan B. Thank you for your assistance.

Darryl

Posted

BTW -- It is small job for someone skilled in Visual Basic to replace Word formatting with HTML like <i>italic</i> and bold, paragraphs and bullets etc.

That field can be send in standard web form to text field in FM.

When serving that field, make sure it is with format "raw".

This way we are publishing on web Technical magazine and all ITC PR news.

Posted

hi, a long time ago someone sent me this javascript which lets the submitter input bold, italic, hrefs etc. in to a web form by clicking buttons. You can probably pick useful bits out from this rather long script as it has some neat ideas.

With a bit more work with javascript I guess it would be possible to input the html-ised text into a hidden field and preview it styled up on the page before submitting.

<!-- TWO STEPS TO INSTALL HTML BUILDER:

1. Paste the coding into the HEAD of your HTML document

2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin

function View(form) {

msg=open("","DisplayWindow","status=1,scrollbars=1");

msg.document.write(form.Text2.value);

}

function Generate(form) {

var txt="<html><HEAD><TITLE>"+form.Name.value+"</TITLE></HEAD>rn";

txt+=

"<CENTER><h1><font color=red>"+form.Name.value+"</font></h1></CENTER><hr>rn";

txt+="<body><font size=4>rn";

if(form.Text1.value)

txt+=form.Text1.value+"rn"; if(form.Fav1URL.value||form.Fav2URL.value||form.Fav3URL.value||form.Fav4URL.value||form.Fav5URL.value||form.Fav6URL.value) {

txt+="<hr><font>Some of my favorite links:<BR><ul>rn<LI><a href=http://javascriptsource.com>The JavaScript Source</a><BR>rn";

if(form.Fav1URL.value)

txt+="<LI><a href="+form.Fav1URL.value+">"+form.Fav1Title.value+"</a><BR>rn";

if(form.Fav2URL.value)

txt+="<LI><a href="+form.Fav2URL.value+">"+form.Fav2Title.value+"</a><BR>rn";

if(form.Fav3URL.value)

txt+="<LI><a href="+form.Fav3URL.value+">"+form.Fav3Title.value+"</a><BR>rn";

if(form.Fav4URL.value)

txt+="<LI><a href="+form.Fav4URL.value+">"+form.Fav4Title.value+"</a><BR>rn";

if(form.Fav5URL.value)

txt+="<LI><a href="+form.Fav5URL.value+">"+form.Fav5Title.value+"</a><BR>rn";

if(form.Fav6URL.value)

txt+="<LI><a href="+form.Fav6URL.value+">"+form.Fav6Title.value+"</a><BR>rn";

txt+="</ul></font>";

}

if(form.EMail.value){

txt+="<hr>Questions? Comments? E-Mail me:rn";

txt+="<address><a href=mailto:"+form.EMail.value+">"+form.EMail.value+"</address>rn";

}

txt+="</font></body></html>";

form.Text2.value=txt;

}

function AddText(form, Action){

var AddTxt="";

var txt="";

if(Action==1){

txt=prompt("Text for the level 1 header.","Text");

if(txt!=null)

AddTxt="<h1>"+txt+"</h1>rn";

}

if(Action==2){

txt=prompt("Text for the level 2 header.","Text");

if(txt!=null)

AddTxt="<h2>"+txt+"</h2>rn";

}

if(Action==3){

txt=prompt("Text for the level 3 header.","Text");

if(txt!=null)

AddTxt="<h3>"+txt+"</h3>rn";

}

if(Action==4) {

txt=prompt("Text to be made BOLD.","Text");

if(txt!=null)

AddTxt="<b>"+txt+"</b>";

}

if(Action==5) {

txt=prompt("Text to be italicized","Text");

if(txt!=null)

AddTxt="<i>"+txt+"</i>";

}

if(Action==6) AddTxt="rn<p>";

if(Action==7) AddTxt="<BR>rn";

if(Action==8) AddTxt="<hr>rn";

if(Action==9) {

txt=prompt("URL for the link.","http://");

if(txt!=null){

AddTxt="<a href="+txt+">";

txt=prompt("Text to be show for the link","Text");

AddTxt+=txt+"</a>rn";

}

}

if(Action==10) {

txt=prompt("URL for graphic","URL");

if(txt!=null)

AddTxt="<img src="+txt+">rn";

}

form.Text1.value+=AddTxt;

}

function ResetPage(form) {

if(confirm("Reset the page?")) {

form.Text1.value="";

form.Text2.value="";

form.Name.value="";

form.EMail.value="";

form.Fav1URL.value="";

form.Fav1Title.value="";

form.Fav2URL.value="";

form.Fav2Title.value="";

form.Fav3URL.value="";

form.Fav3Title.value="";

form.Fav4URL.value="";

form.Fav4Title.value="";

form.Fav5URL.value="";

form.Fav5Title.value="";

form.Fav6URL.value="";

form.Fav6Title.value="";

}

}

// End -->

</SCRIPT>

<!-- STEP TWO: Put this code into the BODY of your HTML document -->

<BODY>

<CENTER>

<P>Instructions:<OL>

<LI>Fill out the table with stuff you want to appear on your page.

<LI>Click on Generate Source.

<LI>Make adjustments if you want in the text area.

<LI>Click on View to check out your page.

<LI>If you want to save the source as a file you will have to cut and paste to a text editor.</OL>

<HR>

<FORM ACTION="">

<TABLE border=2>

<TR><TD>Page Title:<TD>

<input type="text" name="Name" size=30>

<TR><TD>Your E-Mail Address(*):<TD>

<input type="text" name="EMail" size=30><TR><TD colspan=2>Your favorite sites:(*)

<TR><TD>URL:<TD>Title:

<TR><TD><input type="text" name="Fav1URL" size=30>

<TD><input type="text" name="Fav1Title" size=30>

<TR><TD><input type="text" name="Fav2URL" size=30>

<TD><input type="text" name="Fav2Title" size=30>

<TR><TD><input type="text" name="Fav3URL" size=30>

<TD><input type="text" name="Fav3Title" size=30>

<TR><TD><input type="text" name="Fav4URL" size=30>

<TD><input type="text" name="Fav4Title" size=30>

<TR><TD><input type="text" name="Fav5URL" size=30>

<TD><input type="text" name="Fav5Title" size=30>

<TR><TD><input type="text" name="Fav6URL" size=30>

<TD><input type="text" name="Fav6Title" size=30>

<TR><TD colspan=2>Body(*):

<TR align=center><TD colspan=2>

<input type="Button" value="Header1" onClick="AddText(this.form,1);">

<input type="Button" value="Header2" onClick="AddText(this.form,2);">

<input type="Button" value="Header3" onClick="AddText(this.form,3);">

<input type="button" value="Bold" onClick="AddText(this.form,4);">

<input type="button" value="Italic" onClick="AddText(this.form,5);">

<BR><input type="button" value="Paragraph" onClick="AddText(this.form,6);">

<input type="button" value="Break" onClick="AddText(this.form,7);">

<input type="button" value="Line" onClick="AddText(this.form,8);">

<input type="button" value="Link" onClick="AddText(this.form,9);">

<input type="button" value="Graphic" onClick="AddText(this.form,10);">

<BR>

<textarea name="Text1" Rows=8 Cols=60></textarea>

<TR align=center><TD colspan=2><input type="button" value="Generate Source" onClick="Generate(this.form);"><caption>(*=optional field)</caption>

</TABLE>

<HR>

<input type="button" value="Reset" onClick="ResetPage(this.form);">

<input type="button" value="About" onClick="alert('This JavaScript Copyright © Tim Helvey')">

<input type="button" value="View" onClick="View(this.form);"><BR>

<textarea name="Text2" rows=8 Cols=70></textarea>

</FORM>

</CENTER>

<p><center>

<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>

by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

</center><p>

<!-- Script Size: 6.31 KB -->

regards, jeff

Posted

Hi Jeff,

Thank you for providing the script. I knew there had to be ways around the problem. I don't know if I will use this or not but I will definitely play with it a bit. i might use the bold, italic, paragraph and links markup so people can work on their submission before they up-load and then i will have Filemaker display the result in Raw encoding. I also want people to be able to edit their contribution online and I will have to see how Filemaker handles the html Code when they do that. I may be asking to much from the contributers, however.

Darryl Burgwin

Graduate Programme in Sociology

York University

Toronto, Ontario, Canada

This topic is 7919 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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