For each field, you could define your own form template. By default, it is the following (HTML):
The first %s is the label, the second %s is the input itself. So let's say you don't want to display a label at all, and just the input. Then you could do something like this:
So the %2$s let's the code know it's the second value we need, not the first. If you only use %s (go ahead and see for yourself), it would just display the first value - the label in this scenario. Feel free to add more HTML/CSS or anything else you'd like for a specific field. Perhaps you need some extra divs or classes and do some JavaScripting too. That's all OK. Perhaps though, it would be easier to make a "field type" out of what you want? So contact me if it's something others could profit from too and I'd be happy to implement that!
For your information: the form template uses the PHP function vsprintf. So that's why both %s and %2$s both work.
It could be that you want to do some edits to the form, generated by Block Developer. Most things can be done by configuring and adding fields, but maybe it's something that's just not possible. You can shoot me a message saying what you'd like to achieve OR you could overrule the "renderForm" function, which renders the complete form. Just go to your controller.php file and add this function:
You can then navigate to /packages/block_developer/src/BlockDeveloper/Block/BlockController.php and copy (parts of) the contents of this function into your own controller.php file. Make the changes you need in your form and you should be ready to go. Would be best if you do return the parent function at the end though, to make it future proof!
Use, by you or one client, in a single end product. The total price includes the item price and a buyer fee.
Use, by you or a client, in 5 single end products. The total price includes the item price and a buyer fee.
Use, by you or a client, in x/xx single end products.
Upon request, quote will be made and sent to you via email.
Got something to say? Need help?
View support forum