← Back to team overview

dhis2-users team mailing list archive

Re: Dataset Section

 

Hi Kader,

actually what you suggest is already implemented in 2.16. You can upload
arbitrary CSS and Javascript through the Web API. So e.g. put an id
"form-table" on your custom form table, and then something like that in the
CSS:

#form-table td {
  width: 3em;
}

Docs here: https://www.dhis2.org/doc/snapshot/en/user/html/ch32s37.html

2.16 will be out shortly.

Lars






On Thu, Jul 24, 2014 at 7:40 PM, Kader Irchad Barry <kaderb777@xxxxxxxxx>
wrote:

> I agree with you.
> In fact, I think it would be nice to complete the ability to create custom
> forms, by giving the possibility to edit its css styles in a separate file.
> This way, we could have a more complete control on the look-and-feel of the
> forms.
> Adding cellspadding style in the td tags (<td style="cellpadding:0px"
> ...>) didn't work for me, and I did not look more forward to solve this
> problem, guessing that the problem came from the management of the style
> sheets.
> Do you think developers can have a look at it more closely? It could be
> nice to give this ability in order to complete the creation of customized
> forms.
>
>
>
>
> 2014-07-24 20:19 GMT+03:00 Knut Staring <knutst@xxxxxxxxx>:
>
> Thanks Kader,
>>
>> I was thinking there would be a more elegant method than to insert a
>> style for each of the 24x20 cells, but your suggestion works well with a
>> simple search/replace of "input" in Notepad++ (no need for an HTML editor).
>>
>> I would also love to get rid of the excessive padding to the left and
>> right of the input field in the cell.
>>
>> And of course it would be nice to not have to manually insert the 240
>> data bindings, so would very much welcome the realization of Lars' thoughts
>> on making the auto-generated form available as a starting point for the
>> customization.
>>
>>
>>
>> On Thu, Jul 24, 2014 at 7:01 PM, Kader Irchad Barry <kaderb777@xxxxxxxxx>
>> wrote:
>>
>>> Hi Knut,
>>>
>>> For customizing the forms, I move all the source code to a html wysiwyg
>>> editor, such as frontpage. This gives me the ability to identify the form
>>> elements and give them the layout I want.
>>>
>>> For the cell width, I add a _style_ attribute in the input tag. This is
>>> one example:
>>>
>>> <input *style="width:4em;text-align:center"*
>>>  id="TCTY9boIn41-j5CfAgw1uth-val" title="TCTY9boIn41 -xxx" value="xxx" />
>>>
>>> You can adapt the size with the width attribute (here 4em, but could be
>>> more or even less, depending on how you want to manage the inputs)
>>>
>>> Best regards
>>> Kader
>>>
>>>
>>> 2014-07-24 19:47 GMT+03:00 Knut Staring <knutst@xxxxxxxxx>:
>>>
>>> Hm...I thought custom forms would do the trick, but unfortunately the
>>>> very act of binding each cell in the table to a
>>>> dataelement/categoryoptioncombe makes in the online editor makes the cells
>>>> far too wide (see the attached form).
>>>>
>>>> Would be greateful for tips on how to keep the cells the same width as
>>>> they are in the right hand columns.
>>>>
>>>>
>>>>
>>>> On Wed, Jul 23, 2014 at 6:42 AM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>>>
>>>>> Related to this, we have a big form where most sections are very
>>>>> simple and broken down only by gender, but one is also broken down by A LOT
>>>>> of age groupings, so the auto-generated form becomes extremely wide and the
>>>>> users have to scroll a lot horizontally. This also means it is very easy
>>>>> for them to lose track of where they are, though of course they do have the
>>>>> little box in the upper right corner which is meant to help with exactly
>>>>> those cases.
>>>>>
>>>>> So, in general we are very happy with the autogenerated form (and it
>>>>> is huge, with 10 sections), but would like to be able to customize the
>>>>> layout for this particular section (actually, the IDEAL option would be to
>>>>> be able to specify the width of the cells - as we could well have cells
>>>>> only a third of the automatic width).
>>>>>
>>>>> I suppose the best solution for now is to separate out this particular
>>>>> section into a separate form, but are we planning to support custom forms
>>>>> for sections?
>>>>>
>>>>> Knut
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jul 23, 2014 at 6:23 AM, <rin.channara@xxxxxxxxx> wrote:
>>>>>
>>>>>>  Hi all developers,
>>>>>> *MY SUGGESTION:*
>>>>>> In “section grey field management” of combo category options. Has
>>>>>> only “Disable field” for disable entry value. But I think it is
>>>>>> important, we should have “Hide field” to hide some combo category. Because
>>>>>> it effect on showing in Data Entry, if we has many combo category option
>>>>>> cross with data element.
>>>>>>
>>>>>> thank you
>>>>>> CHANNARA
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~dhis2-users
>>>>>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Knut Staring
>>>>> Dept. of Informatics, University of Oslo
>>>>> +4791880522
>>>>> http://dhis2.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Knut Staring
>>>> Dept. of Informatics, University of Oslo
>>>> +4791880522
>>>> http://dhis2.org
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-users
>>>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-users
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> +4791880522
>> http://dhis2.org
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References