jhanajc Posted October 2, 2015 Report Share Posted October 2, 2015 I know this should be easy but.. How can insert a custom INPUT field and a form SUBMIT button within an HTML block on a details report? Thanks! Jon (newb) Quote Link to comment Share on other sites More sharing options...
1 jhanajc Posted October 4, 2015 Author Report Share Posted October 4, 2015 Successful test.. <SCRIPT LANGUAGE="JavaScript"> function saveChange (form) { TestVar =form.inputbox.value; document.getElementById('EditRecordFIELD_X').value = TestVar; document.getElementById("caspioform").submit(); </SCRIPT> <FORM NAME="myform" ACTION="" METHOD="GET"> <INPUT TYPE="text" NAME="inputbox" VALUE=[@field:FIELD_X]><P> <INPUT TYPE="button" NAME="button1" Value="Save" onClick="saveChange(this.form)"> </FORM> Quote Link to comment Share on other sites More sharing options...
0 Walter Posted October 2, 2015 Report Share Posted October 2, 2015 Hello Jon, Try creating another DataPage and deploying it in the HTML Block with the iFrame deployment method. Quote Link to comment Share on other sites More sharing options...
0 jhanajc Posted October 2, 2015 Author Report Share Posted October 2, 2015 Thanks Walter, That would surely work but I was hoping there is away to just place an input text field within the HTML Block on the same datapage. My attempts have failed. Is it not possible? Also found this: http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/how-to-convert-existing-html-forms-to-work-with-caspio/ Which describes how to post data from your own external web form to a caspio datapage. Jon Quote Link to comment Share on other sites More sharing options...
0 Walter Posted October 2, 2015 Report Share Posted October 2, 2015 Jon, if you say what is your goal, maybe I will be able to help. If you want to change the data, change the Form Element on the Details page of the field to an editable one (Text Field, for example), then the "Update" button is displayed on the Form. If you want to display Details and Submit a new data, deploy two DataPages on the same Web Page. In this case, I believe, the following articles help: http://howto.caspio.com/tech-tips-and-articles/parameters/how-to-create-a-one-to-many-relational-datapage/ http://howto.caspio.com/getting-started/create-a-one-to-many-relationship/ Quote Link to comment Share on other sites More sharing options...
0 jhanajc Posted October 2, 2015 Author Report Share Posted October 2, 2015 Hi Walter appreciated, My goal is to embed an editable Text Field in an HTML Block. We are attempting this instead of using the conventional method so that we can achieve the desired appearance for the datapage. It almost works if I try this: I add the FIELD_X to the datapage, make it Hidden. Then place this code in an HTML Block: <input name="EditRecordFIELD_X" class="cbFormTextField" id="EditRecordFIELD_X" type="text" size="25" maxlength="255" value=[@field:FIELD_X]> If I type "A" in the field and click the standard Update button, I get "A," saved in the table and "A," displayed on the form. If I then type "B" in the field and click the standard Update button, I get "B, A," saved in the table and just "B," displayed on the form. How can we make it behave like a normal editable text field? Quote Link to comment Share on other sites More sharing options...
0 jhanajc Posted October 3, 2015 Author Report Share Posted October 3, 2015 Alternatively, I can construct a form and copy the entered value to the hidden field using javascript. That should work. Quote Link to comment Share on other sites More sharing options...
Question
jhanajc
I know this should be easy but..
How can insert a custom INPUT field and a form SUBMIT button within an HTML block on a details report?
Thanks!
Jon (newb)
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.