close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add a new TextArea field?

Thread began 11/16/2009 11:35 am by pete268226 | Last modified 12/18/2009 12:36 pm by Eric Mittman | 6419 views | 20 replies |

pete268226

Add a new TextArea field?

I'd like to add a new text area field to my form using DataAssist. I understand from another thread that I must:
=========================
1. create a new column in my db
> done. I called it: ProductIngredients
2. create a new form field in the Products_Insert.php doc (and the update one too)
>uh. not done. I can see <input> elements for a text field, but I'm not sure how best to add a text <em>area</em>.
>UPDATE: No worries here - a typical text area method worked.
3. update the insert record server behavior using DataAssist
>I'm pretty sure I can manage this once I have the text area.
>UPDATE: I'm not sure of the exact steps here to validate and update the record. Could someone please outline how best to do this?
=========================
So, if I just add a text area like any old form, will this work or is there something extra I need to include in order to have the little text editor included?

Thanks,
Pete

Sign in to reply to this post

pete268226

Any help out there...?

I'm bumping this topic in the hopes that someone can help with my request below.
Thanks,
Pete

Sign in to reply to this post

Eric Mittman

According to your update it seems that you have got the text area in place on the insert and update pages correct? If you have added the text area and have the column in your db table then you just need to edit the insert server behavior and the update server behaviors.

To do this start with the insert, double click on it from the server behaviors tab. In here just go to the step where it lists the columns in your table, find your new column and select it. For the value use the lightning bolt icon to set the value to your new text area input in the form. Then just finish and save the page, that is all for the insert.

Next on the update page you just first select your new text area, then in the property inspector for the value use the lightning bolt, expand the recordset and make sure to select the new column from your table. Once you have done that part you can just update the update server behavior the same way that you did the insert, no different.

Please give this a try and let us know if you have any further troubles with it.

Sign in to reply to this post

neilo

Hi Eric,

Can one insert tHTML Editor functionality - as provided with PowerStore - to the new text field, or would one have to have the HTML Editor extension?

Thanks

Sign in to reply to this post

pete268226

Eric, that's awesome! It is now populating the database and I'm able to call it in the page.

I have one further issue now: When I choose to update a product, I get an empty page. That is to say, I can search for products, select them, etc. If I want to update, I get an error that states: "No record found."

The other is to re-iterate the previous question from NielO - Can one insert an HTML Editor functionality - as provided with PowerStore - to the new text field, or would one have to have the HTML Editor extension?

Thanks again for your support - this is why I settled on WA products long ago...
Pete

Sign in to reply to this post

Eric Mittman

In regards to replacing the text area with an HTML editor you would need the HTML Editor extension to do this. To add it you would just select the text area then insert the HTML Editor onto the page.

For your update page not finding the record what is the URL of the link you click on to get to the update page? It should have the id of the record as a URL parameter in it, if it does not then an error like this can occur. After you update an item are you able to go to the detail page for that item and see the details there?

Sign in to reply to this post

pete268226

Hi Eric,
I re-installed a new version of the Admin Products_Insert.php and it does work now.

[EDIT] Image issue resolved as well with the uploading of a fresh doc.

In order to have my new data retained in the new field, do I have to insert a validation behaviour? Neither of these items would be 'required' - one lists the ingredients of a product and the other lists any testimonials that customers have provided.

HTML Editor - thanks. I just downloaded it - haven't figured it out yet.

Pete

Sign in to reply to this post

pete268226

Topic Bumped

Regarding keeping data in my additional custom fields after update/insert - the fields are blank. How can I keep the data in them as with the other PowerStore fields?
-Pete

Sign in to reply to this post

Eric Mittman

For the update page you will need to set the initial value of the text field to be like this:

php:
$row_WADAProducts['your new column name']



This will ensure that whatever has been set for this value will autopopulate on the update page. You will also need to add this to the detail page where you would like to see this value.

Once you have done that the only thing left to do would be to add in some validation on the form to ensure that the user enters a value, but it seems that since this is an optional field that may not be necessary.

Sign in to reply to this post

pete268226

Got it - whew!

Very helpful, thank you Eric... I ended up putting: <?php echo $row_WADAProducts['ProductIngredients']; ?> in as my init value. This is clear to me now.

Pete

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...