I have a button on my page that links to a section. This works without problems, but I need to have this value as a metafield. When I enter the #anchor in a URL metafield it gives me an error saying I’m only allowed to use a certain schema. Not sure how to fix this, because using a single text metafield does not allow my to add that field to the button URL.
Hello @Mark04 , You assigned a type of your meta field as a URL so that it can’t accept these values with the symbols and others. It will accept only URLs in that value. You need to put URL compulsory for this URL type meta field or you have to make a new meta field with an accept value like this which is a single line text value.
Feel free to reach out if you have any questions or need assistance.
Best Regards,
Darshan
I understand that it does not accept it, but that is weird because it is very common to link an anchor tag to an ID of a section. And like I said the single line text value would be a solution but i cannot link that metafield type to a link in the shopify editior.
If you have a look at the screenshot below, you can see that it works when I input the text, but I need it as a metafield
Hello @Mark04 , You can add here your assigned meta field. So please create a single line text typed meta field that can accept your symbols like “#” and then you can add it here with the customization field of your input box in the block’s setting.
Please see the screenshots below.
Please try this and still, if you have any queries or doubts then please reply.
If I managed to help you then, don’t forget to Like it and Mark it as a Solution!
Best regards,
Darshan.
Hi,
I know how to add metafields but i cannot add a single line text value metafield to a link input. I’m only allowed to add a URL metafield, which does not support my anchor jump link
Hello @Mark04 , I know that the input settings don’t accept single-line text types. You should make a new setting of the block which is typed text and fetch it in your code when your anchor tag’s “href” is passed. Put that value in the anchor tag to get this.




