We are creating a listing system within ExactTarget using AMPscript powered forms, data extensions and Microsite Landing pages. An HTML form is used to add and edit "items" in the system which appear on these lists. When a new record (an item on the list) is created, it appears that HTML coding including links and markup work fine and nothing breaks. If the item is edited though (done through the same add/edit html form/landing page) data seems to move around between fields and get corrupted or changed. I suspect this is a result of "'s appearing within the @variables creating confusing between what is intended to indicate a data field from the extension vs. quotation marks within the text. Point is that when a new item is added, it is fine, but as soon as we try to edit the item through the form, the quotations get converted no longer displaying as intended and sometimes actually moving data around on the page. I'm hoping to find a means to format the text area field on the form to preserve the characters as entered though the solution may be different. Using a text editor for the text area has been suggested as a possible solution but for specific reasons is not an option at this time. Please let me know if this is too specific or not enough.
Support Tech Details: The text area is a simple text area set as
<div class="" title="the title here" data-toggle="tooltip"data-placement="left">
Detail Description:
</div>
<textarea name="Details" class="form-control" cols="48" rows="5" maxlength="1800" id="Enter Item Details Here" value="%%=v(@Details)=%%">
%%=v(@Details)=%%
</textarea>
The field in the Data Extension is simply a "Text" field with the 1800 char. limit. Upsert detail includes:
SET @Details = RequestParameter ("Details")
and
SET @UpdateEvent = UpsertData("Events_List", 1, "itemGUID", @itemGUID, "itemID", @itemID, "Details", @Details... etc.
(more fields are involved in the upsert but probably not required for this description.
The UpsertData works fine, but the result is that if we use code to enter something like "
When adding a new item and it will save and look fine. However, if we go back to that item to EDIT it (same form is used for edit upsert and add item) instead of "
appearing in the Textarea, the symbol "
now appears. If that is saved (which will upsert) it now throws off the field information and can actually put data into incorrect fields. For other characters such as ©
it won't throw off the data fields, and also adds the item as intended (in this case with a copyright indicia) but again if the page is edited, instead of the code, the copyright symbol appears in the text area, and if saved, will no longer render as intended on the items detail page.
I suspect this is a matter of "escaping" the characters but the solution may be encoding or formatting.
upsert
call, or anything else that might be happening here. There is no way anyone can give a credible answer. It will be a guess, wait for you to try it, then see if it worked. The question needs to show exactly what you are doing, otherwise it's just opinions on what it could be, not what it actually is.