Trouble with Arduinolibs LCD library

I'm trying to write a sketch with a menu on the LCD using the Arduinolibs LCD library and am having trouble understanding how to use the member functions. https://rweather.github.io/arduinolibs/classForm.html#a5cb056ace428e75e321610555bfecac7

The particular function I'm trying to get working but can't is 'void Form::addField(Field*field)'. I just can't seem to work out what to put in my sketch to call that. If anyone has used this library it would be great if they could offer some assistance.

cheers

I just can't seem to work out what to put in my sketch to call that.

What have you tried? Without knowing that you've created a Form object that you are trying to add a Field object to, and without knowing that you have created a Filed object to add to the Form instance, and without knowing what the problem is, you can't reasonably expect us to tell you what is wrong.

Yeh sorry. I created a form called mainForm (as per the example in the library). The form and all the fields that I've set at the top of the sketch work fine, I just need to call addfield within my loop if the answer to a particular boolean field is true, thus creating a context field for want of a better description. I just don't know the correct syntax to call it. I thought it would be as simple as mainForm.addField(Contextfield), and then follow that with a line to initialise the field with its parameters just as they are done at the top of the sketch. Evidently this is not correct because it doesn't compile.

Evidently this is not correct because it doesn't compile.

That is what I would have done, too.

But, when it failed to compile, I would have been able to see the code, the error messages, and the library files, and I could have determined what the problem was.

Since, only you can see the code, the errors, and the library files, that leaves only you to resolve the problem. Best of luck.