You are viewing a single comment's thread from:

RE: Testing The Submit Form Again From SteemThat

in #steemthat6 years ago

I'm just not sure how to pass the tags correctly from the html form. I have tried document.getElementById('tag1').value, document.getElementById('tag2').value,
Etc with no luck. I tried about 25 different combinations of ways to do this such as:
var tags = document.getElementById('tag1').value,
Thinking that if I could just get one tag that would be a start.
So then I would try to do this with it....
JSON.stringify({ tags: "tags"}), but this did not work either...
Then I tried this:
JSON.stringify({
tags: ["tag1","tag2","community","whalepool"],
app: "steemthat",
format: "markdown",
community: "steemthat"
}),

function (err, result) {

Hoping it would just pick op the form id. LOL it was worth a try.

I have literally tried a hundred different combinations with no success on allowing users to enter their tags and the script output to json for the comment broadcast.

I can manually build it and send it with the proper formatting but can't for the life of me find a way to grab users inputed tags and string them and then set them to the proper property so that the blockchain recognizes the extra tags. I think I can $ sign it as a placeholder in PHP with the correct formatting and make it work I think. will try this to make it work.

If anyone has any ideas I would love to hear them. Thanks in advance. I'll be happy to send you some Stish or share the full code with you which is a modification of a tutorial I found one time .

Sort:  

when the tags: is in this format it works. tags: ["tag1","tag2","community","whalepool"], So maybe I only need to stringify if I'm passing other meta data like app: format: etc. Now it is starting to make sense a little. I'm getting the information and then broadcasting it as JSON in a string format to the Steem API... My mind is starting to open up and things are making sense since I typed it out.

I'm now curious as to the specific order that the JSON post has to be sent or does it matter? Back in the day I was much smarter.