Testing The Submit Form Again From SteemThat

in #steemthat6 years ago

With all of the recent news about crypto and stish and steemthat.com things are picking up again. We recently added a way for members to have their recent steemit posts displayed on SteemThat.com also which is nice. Plus they share to our discord, telegram, facebook, twitter, and Stish.io automatically this way.

This is a test post. Thank you

We are submitting posts and debugging from SteemThat.com. I know I am slow to get this part finished but it has given me a fit and there is no docs on getting multiple html entries into a js variable and then outputing that to JSON. I'm no expert but this has been the hardest part of it all. I know a few places do it and allow for people to enter tags and then they submit them to the blockchain. I get the format they need to be in I just cant get them from the page to the json broadcasting correctly. I'm an idiot when it comes to this. I might try to build it in PHP as it might be easier for me.

Sort:  

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 .

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.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 61821.21
ETH 3068.39
USDT 1.00
SBD 3.84