Forum Replies Created
-
AuthorPosts
-
Nicholas Cox
Participantok thanks anyway
December 27, 2024 at 8:34 PM in reply to: ✅Field group not loading collapsed when editing a front end post #47243Nicholas Cox
ParticipantYes i expand the group before saving the post.
Nicholas Cox
ParticipantHi
Ok I came across this post https://support.metabox.io/topic/save_field/ and noticed using
'save_field' => false,this worked for me so thanks anyway.
Nicholas Cox
ParticipantAh ok thanks for clarifying
I will add the extra form field group to the shortcode.Just out of curiosity, if i have more than one custom table (each table being a field group) and they are all linked to the same post type will this cause any issues?
I also have some field groups which are custom models too, so just checking if the shortcode is the way to go for me.
Nicholas Cox
Participantah ok, i was just checking incase there was an other option, thanks
Nicholas Cox
ParticipantSo it would be cool to e.g. use a group field (with the name being the related database table name) and each child field being the column values (using any field type). This would allow flexibility to link multiple custom tables to one field group where we can automatically pull the data in on editing and posting/updating the row to the related database table.
My issue is that to achieve updating multiple related tables from one front end form is fine after submitting the form but when editing a form there is no easy way to prefill the form with the related table data (if exists).
Nicholas Cox
ParticipantHi
I tried this and it used to work about 6 months ago, but now i have checked every setting and the Jquery front end does not validate with custom fields? I created a new custom field using your code above 'hotline' but it adds the required asterisks to the label etc when using the validation rules but there is no error message displayed when submitting the form?
I have also tried this with the the following setup and it does not work either (as previously mentioned)
class RWMB_dc_price_Field extends RWMB_Field { public static function html( $meta, $field ) { return sprintf( $html = ' <div class="rwmb-input-group"><span class="rwmb-input-group-text">' . $prepend . '</span><input class="" id="' . $uniqueID . '" required="' . $required . '" type="number" title="' . $field['field_name'] . '" value="' . $meta . '" placeholder="' . $placeholder . '" name="%s" min="' . $priceMin . '" max="' . $priceMax .'" step="' . $priceStep . '" ><span class="rwmb-input-group-text">' . $append . '</span></div>', $field['field_name'], //$field['id'], $meta ); } }thanks
Nicholas Cox
ParticipantHi
No i am after saving different field data to separate tables in one form. So when each field passes validation it saves into a relational database table based on a set of validation rules.
Nicholas Cox
Participantok well i thought you supported the post_status field like you do for the post title etc.
Nicholas Cox
ParticipantHi
Sorry i must have not been clear enough, when i mentioned the 'field' data, this is the field settings like you can get when sanitizing a field e.g. of $field below. But can this be done in the front end validation? I need to check a form fields attribute value during the front end validation.
function my_sanitize_money_field( $value, $field, $old_value, $object_id )November 30, 2024 at 7:03 PM in reply to: ✅Field group not loading collapsed when editing a front end post #47078Nicholas Cox
Participantusing the url parameter to populate the front end form e.g. http://localhost/testsite/edit-product/?rwmb_frontend_field_post_id=479
Nicholas Cox
ParticipantHi, ok but the 'rwmb_{$field_id}_after_save_field' is ok for saving the field for the post_status, but i am looking to auto populate the form when editing a post. Does metabox automatically populate a field with the id of post_status with the post status value e.g. draft?
I ask as if you are editing a draft post using the front end form then i need it to recognise the current post_status and auto select this from the select field.
thanks
Nicholas Cox
ParticipantHi
Im using
class RWMB_dc_rrule_until_Field extends RWMB_FieldI think im just trying the best way to hide the fields label name too, but not sure how to call this using a custom attribute? Like when you use a hidden field (https://docs.metabox.io/fields/hidden/) it does not display the label, how can i achieve this with a custom field attribute to show/hide this?
hope this makes sense.
Nicholas Cox
ParticipantHi Peter.
It sort of makes sense, i assumed from this that it saved the open and close state. But I guess it would be a nice feature for certain forms. thanks anyway
Nick
Nicholas Cox
Participanti have updated to the latest versions of metabox and extensions also and have the same issue.
-
AuthorPosts