W3C home > Mailing lists > Public > www-forms@w3.org > January 2006

setting a default value (setvalue)

From: Jason Bailey <j.bailey@sussex.ac.uk>
Date: Tue, 17 Jan 2006 11:19:16 +0000
To: www-forms@w3.org
Message-ID: <FFE5FF9E28167C95BF55713B@cssp3392.central.susx.ac.uk>


Hello,
I'm wondering if anyone can spot my mistake. I'm trying to set some initial 
values on a repeated textarea. The repeated area appears but the initial 
instance data does not get overwritten by the setvalue.
I'm viewing my xforms with firefox 1.5 and xforms beta 0.2

I'm using php to produce some of the xform drop downs. The xml data is 
based on an infopath form; hence the my namespace. I've moved the insert 
trigger about and am not sure if this is the cause?

Thanks
Jason

The xforms is....


	  <xforms:trigger>
  <xforms:label>Insert</xforms:label>

  <xforms:insert nodeset="my:group8/my:Highlight" at="1" position="before" 
ev:event="DOMActivate"/>
<xforms:setvalue ref="my:HighCurrentProducts">XXXX</xforms:setvalue>

</xforms:trigger>
  <xforms:repeat nodeset="my:group8/my:Highlight" id="r1">
	
	  <table>
	  <tr>
	
	
	  <td>
	  <xforms:label >Report from:</xforms:label>
	  <xforms:input ref="my:highFrom">

      </xforms:input>
	   <xforms:label >Report to:</xforms:label>
	  <xforms:input ref="my:highTo">

      </xforms:input></td>
	
	
	  </tr>
	
	  <tr>
	  <td>
	  <xforms:label>Current Products</xforms:label>
	  <xforms:textarea ref="my:HighCurrentProducts" >

      </xforms:textarea>
	
	  </td>
	
	
	  </tr>
	
	  <tr>
	  <td>
	  <xforms:label>Next Products</xforms:label>
	  <xforms:textarea ref="my:HighNextPeriod" >

      </xforms:textarea>
	
	
	  </td>
	
	
	
	  </tr>
	
	  <tr>
	  <td>
	
	  <?php $drop1=new DropDown();
	  $value_array=$drop1->create_aheadbehind();
	 // print_r($value_array);
	
	
	
	  $label="Schedule Status";
	  $ref="my:HighScheduleStatus";
	  $namespace="xforms";
 
$drop11=$drop1->call_select1($label,$ref,$value_array,$default,$namespace)
	
	  ?>
	  <xforms:label >by</xforms:label>
	    <xforms:input ref="my:HighScheduleStatusPer">

      </xforms:input>
	
	
	
	  <?php $drop2=new DropDown();
	  $value_array=$drop2->create_dwm();
	 // print_r($value_array);
	
	
	
	  $label=" ";
	  $ref="my:HighScheduleUnits";
	  $namespace="xforms";
 
$drop11=$drop1->call_select1($label,$ref,$value_array,$default,$namespace)
	
	  ?>
	
	  	
	
	  </td>
	
	
	  </tr>
	  <tr>
	  <td>
	
	  <?php $drop3=new DropDown();
	  $value_array=$drop2->create_overunder();
	
	  $label="Budget Status";
	  $ref="my:HighBudgetStatus";
	  $namespace="xforms";
 
$drop11=$drop1->call_select1($label,$ref,$value_array,$default,$namespace)
	
	  ?>
	
	
	
	
	  	   <xforms:label >by (%)</xforms:label>
	  <xforms:input ref="my:HighBudgetPer">

      </xforms:input>
	
	
	</td>
	
	  </tr>
	
	  </table>
	
	
	
	  </xforms:repeat>


	
	


<xforms:trigger>
  <xforms:label>Delete Section</xforms:label>
  <xforms:delete nodeset="my:group8/my:Highlight" at="1" position="before" 
ev:event="DOMActivate"/>
</xforms:trigger>
Received on Tuesday, 17 January 2006 11:19:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:02 GMT