Opened 13 years ago

Closed 13 years ago

#878 closed enhancement (fixed)

PrintPDF with Template: Define max characters for input fields + add line breaks in PDF

Reported by: verenadiewald Owned by: dev
Priority: minor Milestone: 2.7.3 release
Component: print Version: 2.7.2
Keywords: Cc:

Description

  • define a new attribute in json template for limiting number of possible characters in html input fields
  • add line breaks in serverside decorator class when input texts reach cell ends

Change History (1)

comment:1 by verenadiewald, 13 years ago

Resolution: fixed
Status: newclosed
  • to configure the clientside maxLength param for input fields in html, add the maxCharacter attribute to the controls-section of the specified element in the config json
    {
                "id" : "comment1",
                "label" : "Kommentar 1 (40 Zeichen)",
                "maxCharacter" : 40,
                "type" : "textarea",
                "size" : 5,
                "pageElementsLink" : {
                    "kommentar1" : "value"
                }
    } 
    
  • line breaks in class mbParagraphDecorator will be added if the defined width in the width attribute in the pages->elements section of the specified element in the config json is reached for the pdf cell
    "kommentar1" : {
                        "type" : "para",
                        "x_ul" : 39,
                        "y_ul" : 269.8,
                        "font_family" : "Arial",
                        "font_size" : 12,
                        "width" : 100,
                        "height" : 5,
                        "align" : "L",
                        "border" : 0,
                        "fill" : 1,
                        "border_width" : 0.5
    } 
    
Note: See TracTickets for help on using tickets.