Support Forum
Hi, I'm new to metabox, I would like to know if the following scenario is possible.
custom field 1 = https://siteurl.com
custom field 2 = /submit
custom field 3 = 30
custom field 4 = custom field 1 + custom field 2 + custom field 3 = https://siteurl.com/submit/30
Please kindly let me know which plugin or tool I should use inside metabox.
Thanks so much!
Hi ac,
Thank you for getting in touch.
Currently, there is no field that grabs values of other custom fields to use as its value. When outputting the value, you can just concatenate the value of 3 fields into one.
For example:
$value1 = rwmb_meta( 'custom_field_1' );
$value2 = rwmb_meta( 'custom_field_2' );
$value3 = rwmb_meta( 'custom_field_3' );
echo $value1 . $value2 . $value3;
You guys are cutting edge... and this is one thing that I've found troubling with ACF and was hoping you guys had solved. With so many other great features you have, a field that dynamically updates with a function... sort of a "function field", that is an equation or "builder" in reference to other fields either in the same post or another, would be an absolute game-changer for advanced users.
What are the odds you guys would develop such a thing inside the UX instead of having to revert to the templating language when calling these fields? The reason it's so important is that many of us use other plugins that aren't easily "penetrable" in the sense we cannot simply go affect how that plugin would pull in a custom field and do what you suggest above.
Something as simple as giving a URL field the ability to be a text link (ie, wrap text inside the {text here} would be super helpful. Since the URL field doesn't offer this, it leads us to ask you how to combine fields.
Hope you will have some sort of solution here where fields can either be combined using a certain custom field type in metabox, or to enhance things like the URL field.
Hi OldGreg,
Thanks for your feedback.
I will inform the development team to consider supporting the field URL. If you want to add the URL behind the text, please use the field textarea
or WYSIWYG
.
Yes that would work… the case that’s difficult is when we need logic like displaying alternate phone numbers based on time of day. We can do that with conditions somehow?