Using weblib to submit a textfield

Using weblib to submit a textfield

by Dilina Fernando -
Number of replies: 1
Hi,

I'm developng the moodle timeline course fromat for a undergraduate project.

I would like to know how i can add a simple textfield and a submit button to get the data and display it back redirecting to the same page.

I have used html code inside php code to achieve this. However i'd like to know how to use moodle function to develop it.

I have used weblib.php to add a textfield and a button. however i'm unable to retrive the data from the textfield.

Any help would be appreciated

thank you

Average of ratings: -
In reply to Dilina Fernando

Re: Using weblib to submit a textfield

by Shane Elliott -
Picture of Core developers Picture of Plugin developers
Hi Dilina,

Not sure how you've coded the form (if you can post the code that would help), but you can retrieve GET/POST variables using optional_param() or required_param()

HTH

Shane.