I have a Product content type with these fields; title, body, and one entity reference revisions(Paragraph: field_select_module).
I am creating a custom REST API(custom module) to export the fields in the JSON. I am able to print the title and body. Could someone help me to print the paragraph fields which have title and image(Media) and title and image will repeat 3 times. It should be inside this array 'product_list' => array(),
I have a big problem with file upload. I have a form with 3 fields. One is file field.
When I'm trying to call any function like file_save_upload() I'm always getting errors... cannot call function
How I can make it to work?
I don't wan't to use file_managed because i want to change filename before saving and I want to store all form datat in my custom database table. Any help would be great.
With the #disable property I can make a field not editable
$ form ['field_meal'] ['widget'] [0] ['value'] ['# disabled'] = FALSE;
I have read that there is an option to do this through #states
I don't think that in my case it will be fine, as I have a select on an entityReference field and in relation to some boolean fields of the entityReference I have to make these fields editable or not.
I tried with the callBack and ajax response but I couldn't find any command to make the fields uneditable
I hope I was clear