This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

mjauvin
Incremental
Incremental

And what about the use of this function ?

formRenderField('fieldToUpdate', ['useContainer'=>false])

mjauvin
mjauvin

Sorry, I missed this last question. Did you find the answer?

Incremental
Incremental

No I sticked to your code, I saw an example with this function, but didn't find any good justify in the documentation...

Thanks

mjauvin
mjauvin

You mean this:

$fieldMarkup = $form->renderField($fieldName, ['useContainer' => true]);

What do you not understand?

Incremental
Incremental

I was wondering if there is a difference with this function :

https://octobercms.com/docs/api#formrenderfield

mjauvin
mjauvin

Incremental said:

I was wondering if there is a difference with this function :

https://octobercms.com/docs/api#formrenderfield

Not sure, but I think the one you reference is when you don't have the Form widget object. it basically does the same thing.

mjauvin
mjauvin

If you look at the source code, one calls the other:

public function  formRenderField($name, $options = [])
{
    return $this->formWidget->renderField($name, $options);
}

ref. https://github.com/octobercms/october/blob/a43833d511ec1700ce4ed2a13e573fcbf87c7bee/modules/backend/behaviors/FormController.php#L554,L557

21-28 of 28

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.