I have form that is build in a custom module and using the debug mode I can see its using the core templates currently. But I need to use custom templates to theme the form and its fields. How can I make custom theme suggestions and use custom templates for some specific fields or use one custom form template and all the fields.
Hi,
I have a site on a Drupal 8. I would like to include a reference to an entity in a contact form.
I explain myself:
On each page of my 'Product' content type, I have a contact form. In my content type I have a field called "field_reference". I would like to be able to create a field in my contact form that refers to this field but that the user does not have to fill in.
If my product "A" reference is: 123
In my form I would like to have:
There are multiple ways to achieve what I need but was wondering if anyone could explain the `Drupal` (Version 8) way of achieving this.
I have four very similar paragraphs:
1. Title, subtitle and HTML copy (1 column 3 rows, full page width)
2. Two columns, each column containing content as per point 1 above.
3. Three columns with point 1 content in each column.
4. No title or subtitle. List of unordered bullet points instead of the HTML copy
I have created one custom block having reference entity field. I have two templates to render design. One is 'block--bundle--block_name.html.twig' and another one is 'field--field-field_name.html.twig'.
Inside block--bundle--block_name.html.twig I have below code with some custom HTML-
{% block content %} {{ content }} {% endblock %}
And field--field--field-field_name.html.twig contains below with some custom HTML-