close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

trouble populating input box

Thread began 12/29/2021 6:58 pm by yogastudents362523 | Last modified 12/30/2021 4:12 pm by Ray Borduin | 4 views | 9 replies |

yogastudents362523

trouble populating input box

Hello,

I can now get data input into the HTML editor input box to be stored in the database.
Before I disappear down a rabbit hold and try to code the "obvious" from scratch, is there some simple way to:
(a) get the input box to load up with any current data stored in the database (e.g. for further review/editing) when a user first logs in (for a new session)?
(b) placing any updated versions immediately back into the input box so people can simply continue editing?

Both can be done in PowerMessenger, and it seems so obvious that I fear I have missed some checkbox or similar to allow this.

Where might I find the code for these two events, and before I struggle with jury-rigging something myself?

Thank you,
KAB

(If you want to see the specific page, I will put it in the upcoming private area in the reply to this).

Sign in to reply to this post

yogastudents362523

Hi,

I have put the URL to the page concerned in the private area.

Sign in to reply to this post

yogastudents362523

OK I eventually had a go.

I tried the underneath code snippet.
It first of all told me that there was an error in the SQL syntax, so I recreated everything.
And once I had done that, there was no effect at all; I was just left with the initial value showing in the input box.

Thank you.
URLs you need are in private area..

<?php
if ($rsAllPresenterData->getColumnVal("Biography"))
{
$CKEditor_initialValue = $rsAllPresenterData->getColumnVal("Biography");
}
else
{
$CKEditor_initialValue = "Please place your Biography here.";
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

You had a few issues on the page that I've corrected.

You needed an "update" button on the page to submit the form. Your update trigger had to be changed to use that form submission, and some of your bindings were set to the recordset, which doesn't make sense since it was updating to the existing value.

Finally I updated the default value of the html editor to come from the recordset if it has a value and put in the enter value message if it is blank.

Please download the file so you can see the changes.

Sign in to reply to this post
Did this help? Tips are appreciated...

yogastudents362523

Hi

Thank you.
I have several other places I need to get data through the HTML editor, so I will study this very closely.
I have a backup copy both on the server, and here locally.

I am, as ever, very grateful.

Thanks again,
KAB

Sign in to reply to this post

yogastudents362523

Hello,

ISSUE (1):

I put in some test data. This is literally what is showing upon the page:
"Let's now try <strong>putting this in</strong>, in order to see what happens.<br /> <br /> Thanks.<br /> <br />"

I.e. editor is displaying almost literally what is in the databse, reading back precisely the coding I am assuming it is taking in (from the editor).

I tested by using the "View Source" button built-in to the edite, and I then got:

"Let's now try &lt;strong&gt;putting this in&lt;/strong&gt;, in order to see what happens.&lt;br /&gt; &lt;br /&gt; Thanks.&lt;br /&gt; &lt;br /&gt; &nbsp;"


ISSUE (2)
I am uncertain of the protocol as regards the Update button you have provided, and the Save button within the body of the editor.

When should I use which one?
(Granted that I will have to give instructions to my clientele).

Thank you.

Thank you,
KAB

Sign in to reply to this post

Ray BorduinWebAssist

I've updated the trigger in the update record server behavior so that both buttons will work. (you can remove one or the other if you want)

I've also updated the value so that it will display html properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

yogastudents362523

Hi Thank you. The bolded (strong) text is now displaying correctly, but not the line breaks:

Let's now try putting this in, in order to see what happens.<br /> <br /> Thanks.<br /> <br />


Source code being:
Let's now try <strong>putting this in</strong>, in order to see what happens.&lt;br /&gt; &lt;br /&gt; Thanks.&lt;br /&gt; &lt;br /&gt; &nbsp;

Thanks,
KAB

Sign in to reply to this post

Ray BorduinWebAssist

That might be leftover from when it wasn't working. Please clear it out and try again.

Sign in to reply to this post
Did this help? Tips are appreciated...

yogastudents362523

Thank you, that seems to have been corrected.
I will play around with it for a little while, and hopefully there will be no other issues.
I am immensely grateful.
Gathering such data is essential to my entire project.
KAB

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...