You need to sign in to do that
Don't have an account?

not repeating table with inputfield
Hi,
I try to have a table in a visualforce page, but not a repeating table, so i cannot use <apex:dataTable>.
First column with label (big width) and then 2 columns with input fields (smaller width).
Have i to use the <apex:inputfield> for the fields ?
If yes, how can i make them appear on the same line ? They appear always on separate line.
If no, how can i make the <input> related to the SFDC fields so as to save the value in the correct field ?
I tried this :
<table border="1"> <tr><td colspan="2"></td><td colspan="2">Total</td><td colspan="2">Part</td></tr> <apex:outputText >Label bla bla</apex:outputText> <apex:inputField value="{!Building_Cost__c.CA1a_Real_Rent_Total__c}" label=""/> <apex:inputField value="{!Building_Cost__c.CA1a_Real_Rent_Part__c}" label=""/> </table>
Thanks for your help
Ced
Apparantly the renderer is trying to merge the field with the table, because I also see a tbody tag out of nowhere...
I don't know how to solve this without trying it myself, but maybe this is a solution for you:
It will render a table the way you want it?
All Answers
Something like this?
I tried that at first, but then i've empty lines, as if the <tr> and <td> of the inputfield was not containing the <inputfield>. And the last column is never containing a field.
Field Level Security on the inputfields maybe?
sorry i was not clear, the fields appears on the page, but never in the last column and always on separate lines.
and thus when writing <tr><td><apex:inputfield ...
it renders first an empty line, and then a line with the input field.
Yeah oke, then it's an issue with the inputField tag. Can you use inputText instead? That will work in this case AFAIK!
and if i try something like
the rendering is ok, the default value is correct, but it's not saved in the real SFDC field.
In this case, I've no controller for my VF page, i use only it to overwrite the standard display.
I guess I could create a controller, overwrite the Save command and save all the values of VF fields in the corresponding fields, but I'm wondering if there is nothing easier to do.
same same
<inputText> appear each time on a new line of the table
Last try then: standardStylesheets="false" in your page tag?
no, still the same issues :(
What's the html the page renders? Can you share that?
here is the HTML source of the table
corresponding to :
Apparantly the renderer is trying to merge the field with the table, because I also see a tbody tag out of nowhere...
I don't know how to solve this without trying it myself, but maybe this is a solution for you:
It will render a table the way you want it?
perfect :)
thanks a lot