How we can display value of input field added in admin panel to the Online store

Highlighted
New Member
6 0 0

I am trying to add a form/input tag in the Shopify App admin panel using Ruby on Rails from which I am able to change the text in the input field and this changed value should appear on the store where I placed my assets using the Assets API.

Simply, I just want to change the text of the already displaying element on the store by using the App's Admin Panel.

Looking for any solution or basic example.

0 Likes
Shopify Staff
Shopify Staff
240 33 37

Hey @gaurav69,

 

Just to clarify - you want to create a Shopify app which has an input field, and the value of this field should be displayed on the store?

0 Likes
New Member
6 0 0
Yes, I have one input field on shopify admin panel, whose value should render on the online store. Can you help out here?
0 Likes
Shopify Staff
Shopify Staff
240 33 37

Hey @gaurav69

 

There are a few approaches, depending on the purpose of your app. You could:

 

1. Store the value on your own server and use a ScriptTag to retrieve it.

2. Use the asset API to update a theme asset with the value.

3. Store the value in a metafield and pull it out with liquid.

0 Likes
New Member
6 0 0

Hey @scottydont 

 

Thanks for the reply.

Can you guide me on how I can store these values on the server? If I did, then do I have to create different database for every shop/store.

And also how I can retrieve these values using Script Tags.

0 Likes
Shopify Staff
Shopify Staff
240 33 37

Hey @gaurav69,

 

Consider completing some of the API tutorials to get a clearer understanding of how the pieces fit together.

 

If you have any specific questions, let me know!

0 Likes