LMSouq
moodle-core Open

how to create a form elements with value in moodle

NI
Nisanth
1 month ago
3 views
Problem Description
I am trying to create a form element text with value in moodle. I trying the below : $mform->addElement('text','test', get_string('test')); This is used to create a text box . i want to add value also like <input type='text' value='<?php .... ?>' /> How to do that in moodle

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base