Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How easy is it to dynamically change the HTML control for a field?

0
10 Posted

How easy is it to dynamically change the HTML control for a field?

0

This situation arose while I was building a prototype for a web-base survey application. A survey could have any number of questions, and the answer to each question could be one of the following: • Free format text – shown as a textarea 50 columns wide and 5 rows deep. • One of a number of pre-defined entries – shown as a dropdown list. • A number – shown as a text box with a size of 6 characters. This means that when building the HTML output for the screen I need to know what type of answer is expected so that I can generate the correct HTML tags. In some development infrastructures this may be a complex process, but in my infrastructure it is incredibly easy. This is made possible because of the following facets of my design: • No HTML tags are generated from within any PHP code – it is all done using XSL stylesheets. • I do not have a different stylesheet for each screen with the field names, field labels and field controls hard-coded – I use generic stylesheets where this informat

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123