其他元素旁边的元素 Zend Form
我的表单中有两个元素:
$element = new Zend_Form_Element_Text('valor_causa');
$element->setLabel('Valor da Causa: R$')
->setAttrib('class', 'moneyField')
->addValidator(new Zend_Validate_Float(array('locale' => 'pt_BR')));
$this->addElement($element);
$element = new ZendX_JQuery_Form_Element_DatePicker('data_valor_causa');
$element->setLabel('Data do valor da causa:')
->addValidator(new Zend_Validate_Date(array('format' => 'dd/MM/yyyy')))
->setJQueryParam('dateFormat', 'dd/mm/yy')
->setAttrib('onkeypress', 'mascara(this,Data)')
->setAttrib('maxlength', '10');
$this->addElement($element);
它生成以下 html 代码:
<dt id="valor_causa-label"><label class="optional" for="valor_causa">Valor da Causa:R$</label></dt>
<dd id="valor_causa-element"><input type="text" class="moneyField" value="" id="valor_causa" name="valor_causa"></dd>
<dt id="data_valor_causa-label"><label class="optional" for="data_valor_causa">Data do valor da causa:</label></dt>
<dd><input type="text" maxlength="10" onkeypress="mascara(this,Data)" value="" id="data_valor_causa" name="data_valor_causa" class="hasDatepicker"></dd>
我该怎么做才能让一个元素与另一个元素相邻?就像上图一样。我尝试删除所有装饰器,但 datapicker 不允许我删除所有装饰器。我尝试了一些 CSS 但没有成功。
I have two elements in my form:
$element = new Zend_Form_Element_Text('valor_causa');
$element->setLabel('Valor da Causa: R
It generates the following html code:
<dt id="valor_causa-label"><label class="optional" for="valor_causa">Valor da Causa:Rlt;/label></dt>
<dd id="valor_causa-element"><input type="text" class="moneyField" value="" id="valor_causa" name="valor_causa"></dd>
<dt id="data_valor_causa-label"><label class="optional" for="data_valor_causa">Data do valor da causa:</label></dt>
<dd><input type="text" maxlength="10" onkeypress="mascara(this,Data)" value="" id="data_valor_causa" name="data_valor_causa" class="hasDatepicker"></dd>

What could I do to let one element next to the other? like the picture above. I have tried removing all decorators but datapicker doesnt let me remove all. I tried some CSS but no sucess.
)
->setAttrib('class', 'moneyField')
->addValidator(new Zend_Validate_Float(array('locale' => 'pt_BR')));
$this->addElement($element);
$element = new ZendX_JQuery_Form_Element_DatePicker('data_valor_causa');
$element->setLabel('Data do valor da causa:')
->addValidator(new Zend_Validate_Date(array('format' => 'dd/MM/yyyy')))
->setJQueryParam('dateFormat', 'dd/mm/yy')
->setAttrib('onkeypress', 'mascara(this,Data)')
->setAttrib('maxlength', '10');
$this->addElement($element);
It generates the following html code:
What could I do to let one element next to the other? like the picture above. I have tried removing all decorators but datapicker doesnt let me remove all. I tried some CSS but no sucess.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
float
对我有用:Using
float
works for me: