Data dictionary for chronoforms?

hostricity 04 Jun, 2009
I figured out how to hack the html in order to change the name of a radio button from 'name="radio0"' to 'name="precinct_resident"' - which caused ChronoForms to generate a mySQL table with the column name precinct_resident.

Below is an example for those who would like to do this.

MY QUESTION: It there a data dictionary or some other mechanism for making changes like this in ChronoForms?

In addition, I'd like to define a data element, say "email_address" once and specify the tool-tip information, labels, required or optional, validation, etc., so that every time I use "email_address" in a form or in a table, it will be setup exactly the same way.

If chronoforms doesn't have this feature, is anyone aware of a data-dictionary tool that can generate the html which can then be installed in ChronoForms to generate the database table and the form logic?
_________________________________________________________________________________________________
Here's the example of fixing up the name of a radio button or check box.

All of this works great. The data flows right on through to the database table. ONLY change the "name" of the checkbox or radio button. do not change the other attributes.

This will generate a table with the column name "endorsement_type" and everything will work correctly. REPEAT: Change "name" only. Do not change the id, or any of the other html attributes!

<div class="form_item">
  <div class="form_element cf_radiobutton">
    <label class="cf_label" style="width: 150px;">Is this an individual or organizational endorsement?</label>
    <div class="float_left">
      <input value="Individual" title="Please choose the appropriate answer." class="radio validate-one-required" id="radio30" name="endorsement_type" type="radio" />
      <label for="radio30" class="radio_label">Individual</label>
      <br />
      
<input value="Individual, but include my organization name" title="Please choose the appropriate answer." class="radio validate-one-required" id="radio31" name="endorsement_type" type="radio" />
      <label for="radio31" class="radio_label">Individual, but include my organization name</label>
      <br />
      
<input value="Organizational endorsement" title="Please choose the appropriate answer." class="radio validate-one-required" id="radio32" name="endorsement_type" type="radio" />
      <label for="radio32" class="radio_label">Organizational endorsement</label>
      <br />
      

    </div>
    <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Is this an individual or organizational endorsement? :: Please choose the appropriate answer.</div>
  </div>
  <div class="cfclear"> </div>
</div> 

GreyHead 05 Jun, 2009
Hi Hostricity,

Please check out the Wizard Elements feature in the current releases of ChronoForms. This is a little data library that lets you store snippets and include them into your forms.

You can of course change the field names in the Wizard to more meaningful values as you are building your form.

Bob

PS In general I prefer to keep the ids and names in sync as this can make de-bugging much simpler. This is especaily true when you come to work with JavaScript where MooTools easily picks up field ids as selectors.
hostricity 05 Jun, 2009
Thanks.

I'll take a look at that. Sounds promising.

I will note that the form wizard names all of the fields I have tried with the name I specify except for radiobuttons and checkboxes -- which don't have the ability to name the fields in the form wizard.

Perhaps, that would be a helpful enhancement for the next release.

Thanks again for your help and interest!

Geoff
This topic is locked and no more replies can be posted.