This topic is locked
[SOLVED]

  name of the form Phprunner 5.3

12/28/2010 10:28:00 AM
PHPRunner General questions
E
ericholiveira author

Dear Sergey,
I'm from Brazil
I purchased PHPRunner 5.3 with Denilson Rapelli, but I'm having a doubt in this release.

Where is the form editform1 that existed in previous version.
I used various codes to get data via JavaScript, for example. document.forms.editform1.value_titulo_1.disabled = true; and others with xajax.
In previous issues had {BEGIN addForm}
How to get the form name of the page?
Att
Erich Carlos de Oliveira

Analista de Sistemas

Sergey Kornilov admin 12/28/2010

Erich,
the best approach is to use Javascript API:

http://xlinesoft.com/phprunner/docs/javascript_api.htm
In this case you don't need to hardcode the form name. Let me know what you trying to achieve and I'll supply a more detailed advice.

E
ericholiveira author 12/29/2010

OK,
Since there is no longer the name of the form, I am rewriting the code to work on version 5.3.
I was using a text field that does not exist in the database, to update the masterTable. I would take the value with the postvalue, but this version has stopped working. I do not know how to include a text field and then get the value of $ _POST
For example:
<TABLE>

<TR>

<TD>

{BEGIN status_label}

Status

{END status_label}

</TD>

<TD>{$status_editcontrol}

</TD>

</TR>

{END status_fieldblock}

<TR>

<TD>Movimentação:</TD>

<TD>

<input type="text" name="movimentacao" id="movimentacao"> this field is for update a mastertable.

</TD>

</TR>
</TABLE>
I was using postvalue("movimentacao")

E
ericholiveira author 12/30/2010

I managed to solve ...

I used the tip of the post

http://www.asprunner.com/forums/topic/15782-how-to-add-a-custom-field-to-the-form/
I Add a custom input field in form

<TEXTAREA style="WIDTH: 700px; HEIGHT: 150px" id=value_movimentacao name=value_movimentacao></TEXTAREA>


I added the code in OnPageLoad

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

var val = $("#value_movimentacao").val();

formObj.baseParams['value_movimentacao'] = val;

});


then took the value postvalue('value_movimentacao')