Hello @zulhatfi-aziz
Yes, the input tag is stripped off in custom amp editor because there is a restriction for form element because of validation issues.
Can you please tell me your use case why you want to display input tag in the amp?
Are you creating form?
let me know.
I’m not actually creating form, i wanted to customize my hamburger menu and do toggle class without using js. So my idea is to create input checkbox and hide it and use the status of that checkbox to add class ‘active’ to my menu.
I’m also tried to use amp-bind to do this and same thing happened, my codes in bold has been stripped off.
<button [text]=”visible ? ‘Show Less’ : ‘Show More'”
on=”tap:AMP.setState({visible: !visible})”>
Show More
</button>
<p [class]=”visible ? ‘show’ : ‘hide'” class=”hide”>
Some more content.
</p>
Hello @zulhatfi-aziz
Currently, custom AMP code will be stripped off all the code but regarding this issue I have made a ticket on GitHub and in future, you will see this code working in custom amp editor as well.
Here is the link to GitHub ticket: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/2188
Thanks @ampforwp
Do you think i have other way to do toggle for my menu button and add ‘active’ class without using javascript in amp editor?
Hello @zulhatfi-aziz
Currently, AMP compatible code didn’t work in custom AMP editor But in future, we will add this feature so you can put custom code in custom AMP editor.