Forum Replies Created

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • in reply to: Help Icon not shown on front end form when not logged in #5569
    hirschbrat
    Member

    Hello Steve,

    i can see the icon, too – but only if I am logged in.
    Have you tried to log out from WordPress and see whether the icon is still displayed on the form?

    in reply to: Help Icon not shown on front end form when not logged in #5560
    hirschbrat
    Member

    Hi Steve,

    I am using version 0.9.9.7

    This is my frontend form code:

    /*  
    Title: Post Submit
    Method: post
    Message: Data saved in Piklist Demos, under the Validation tab.
    Logged in: false
    Redirect: bestellen
    */
       
      // Where to save this form
      piklist('field', array(
        'type' => 'hidden'
        ,'scope' => 'post_meta'
        ,'field' => 'post_type'
        ,'value' => 'fvb_order'
      ));
    
      piklist('field', array(
        'type' => 'text'
        ,'scope' => 'post_meta' 
        ,'field' => 'post_title'
        ,'label' => __('Titel', 'piklist-demo')
        ,'help' => 'Help'
      ));
    
      // Submit button
      piklist('field', array(
        'type' => 'submit'
        ,'field' => 'submit'
        ,'value' => 'Submit'
      ));
      
    hirschbrat
    Member

    Hello Steve,

    I tried different field types (text, checkbox, select, number), and it seems that the described behavior only occurs for field type ‘number’.

    Here is my sample code:

    
    piklist('field', array(
        'type' => 'number'
        ,'scope' => 'test_scope'
        ,'field' => 'test_number'
        ,'label' => __('Nummer', 'fvb_de')
        ,'columns' => 3
        ,'value' => '0.00'
        ,'attributes' => array(
          'min' => 0
          ,'step' => 0.01
        )      
    ));
    
    piklist('field', array(
        'type' => 'text'
        ,'scope' => 'test_scope'
        ,'field' => 'test_text'
        ,'label' => __('Text', 'fvb_de')
        ,'columns' => 3
        ,'value' => '0.00'    
    ));

    The $field values after the first submit (save post) (so meta fields didn’t exists before) are:
    test_number:

                 [request_value] => Array
                    (
                        [0] => 0.00
                    )
    
                [value] => Array
                    (
                        [0] => 0.00
                    )

    test_text:

                [request_value] => 0.00
    
                [value] => 0.00

    And after the second submit (save post):

    test_number:
    `[request_value] => Array
    (
    [0] => 0.00
    )

    [value] => 0.00`

    test_text:

                 [request_value] => 0.00
    
                [value] => 0.00

    Hope that helps you

    hirschbrat
    Member

    Hi Steve,
    the Author meta box is hidden (defined in the ‘hide_meta_box’ array of the CPT definition). I also added/removed ‘author’ in the ‘supports’ array, but still wasn’t able to change the author with the piklist field.

    in reply to: Is there a hook After post_meta is saved? #3635
    hirschbrat
    Member

    @Steve,

    thank you for your hint – the piklist_save_field hook does exactly what I want, because it fires only once after ALL meta-data is saved.

    in reply to: Calculation in Add-more fields #3633
    hirschbrat
    Member

    @Steve

    thank you, that works for me, too.

    in reply to: Validation of multiple custom fields at the same time? #3255
    hirschbrat
    Member

    Hello Kevin,

    this is my meta-box code. I want to validate the three fields fvb_shipping_date, fvb_event_date and fvb_return_date.

    /*
    Title: Termine
    Description: Bestellte Produkte
    Post Type: fvb_order
    Capability: manage_options
    Context: side
    Priority: low
    Order: 1
    Locked: false
    Collapse: false
    Meta box: true
    */
    
    piklist('field', array(
        'type' => 'datepicker'
        ,'field' => 'fvb_event_date'
        ,'label' => __('Veranstaltungsdatum', 'fvb_de')
        ,'options' => array(
            'dateFormat' => 'yy-mm-dd'
            ,'firstDay' => '1'
            ,'minDate' => '0'
        )
        ,'required' => true
        ,'on_post_status' => array(
            'value' => 'reserved--closed'
        )
    ));
    piklist('field', array(
        'type' => 'number'
        ,'field' => 'fvb_event_period'
        ,'label' => __('Dauer', 'fvb_de')
        ,'description' => 'Tag(e)'
        ,'value' => 1
        ,'on_post_status' => array(
            'value' => 'reserved--closed'
        )
        ,'validate' => array(
            array(
                'type' => 'limit'
                ,'options' => array(
                    'min' => 1
                )
                ,'message' => 'Min 1 day.'
            )
        )
    ));
    
    piklist('field', array(
        'type' => 'datepicker'
        ,'field' => 'fvb_shipping_date'
        ,'label' => __('Versand', 'fvb_de')
        ,'options' => array(
            'dateFormat' => 'yy-mm-dd'
            ,'firstDay' => '1'
            ,'minDate' => '0'
        )
        ,'required' => true
        ,'on_post_status' => array(
            'value' => 'reserved--closed'
        )
    ));
    piklist('field', array(
        'type' => 'datepicker'
        ,'field' => 'fvb_return_date'
        ,'label' => __('Retour', 'fvb_de')
        ,'options' => array(
            'dateFormat' => 'yy-mm-dd'
            ,'firstDay' => '1'
            ,'minDate' => '0'
        )
        ,'required' => true
        ,'on_post_status' => array(
            'value' => 'reserved--closed'
        )
    ));
    in reply to: Database overrun with _transient options #3252
    hirschbrat
    Member

    Thank you for your answer and your great plugin Piklist.
    Meanwhile I will give your recommended plugin a try.

Viewing 8 posts - 16 through 23 (of 23 total)