Get information back from end user?

Hi,

 

How do I get information back from the user on button press when button is created using tpl, how do I add events to style tpl objects?

 

I want to basically have a text box on a page, where when the user clicks the button, the text inside gets saved to the database in a custom attribute column.

 

Any help is appreciated :slight_smile:

 

-Ian

Well you’d probably want to make it a plugin that registers on certain events.

For one - the call of the page you wish to add the textfield to 'n then to the event responsible for saving/further processing the data after button click.

Maybe you find something on here, it’s the Shopware guide to writing your own plugings: https://developers.shopware.com/developers-guide/example-plugin/

 

Not sure what sort of text you expect to get from them but maybe you’d want to consider extending the database by your own table “customernumber/id, text” or something like that. In this case your data would not have to depend on the shopware architecture itself too much 'n is also safe from updates, etc.