• Hi,

    I am developing a real estate listings site where users sign up and submit their properties in an “add listings” form that already comes with the theme I use. In it the user sets the listing price and the size of the building. My question is:
    Given the existing price field slug and the existing size field slug from the theme’s form can I use your plugin to calculate the price per square foot? (existing_price_field_slug/existing_size_field_slug=calculated_price_per_foot_slug) where the new calculated_price_per_foot_slug field is displayed in the item’s details page.

    If this is possible, can you explain in detail how I would implement this? I thank you in advance for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @makkie65,

    I’m sorry, but with the information provided, I don’t know how the information can be accessed from our plugin, take into account that our plugin does not allows the use of shortcodes into the forms’ structures.

    However, if the information is entered through other form inserted in the same page, you can define some onchange events to get the data entered into these fields, and populate hidden fields in the form created with our plugin, and then, use the hidden fields in the equations as usual.

    For example, if there is a form in the webpage with the fields: field_a, and field_b, and the form created with our plugin includes the hidden fields: fieldname1, and fieldname2, you can insert into the form a “HTML Content” field with the following piece of code as its content:

    <script>
    jQuery(document).on('change', '[id="field_a"]', function(){
    jQuery('[id*="fieldname1_"]').val(this.value).change();
    });
    jQuery(document).on('change', '[id="field_b"]', function(){
    jQuery('[id*="fieldname2_"]').val(this.value).change();
    });
    </script>

    and finally, you can use the fields: fieldname1, and fieldname2 in the equations associated to the calculated fields as usual.

    Best regards.

    Thread Starter GardeCan

    (@makkie65)

    Hi,
    I apologize, but I am NOT a programmer even though I am willing to edit files (I’ve done so successfully in the past), so I am going to need a little more detail.
    My “add listing” form is not in an actual page, it’s in https://www.mydomain.com/dashboard/?ua=newitem where “dashboard” is an actual page in wordpress, but when I go to edit it in the admin it is blank, so I’m assuming that /?ua=newitem is a sub-page that I can’t really access from the admin panel. So, how do I add the hidden “HTML Content” field to the add listing form and how do I make it hidden, then when I “use the fields: fieldname1, and fieldname2 in the equations associated to the calculated fields as usual” where do I get the calculated field slug so I can create a field in my theme with the same slug so I can display it in my item details page. Sorry that I am not more versed in this, but I am trying really hard to make this work. Again, I thank you in advance for your help.

    Thread Starter GardeCan

    (@makkie65)

    Please don’t mark the issue as resolved when it is not resolved. Thanks

    Plugin Author codepeople

    (@codepeople)

    Hello,

    There is a confusion, you should not edit any file, the “HTML Content” field with the piece of code should be inserted in the form created with our plugin, furthermore, to hide this field you simply should enter the special class name: hide through the field’s attribute: “Add CSS Layout Keywords”.

    The equations are entered through the “textarea”: “Set equation” in the properties of the calculated fields in the form.

    I’m assuming in my previous example that your webpage includes two forms, one of them created with another plugin or the theme, and the second one created with our plugin, furthermore, I’m assuming that the first form includes the fields: “field_a” and “field_b”, and you want populate the fields: fieldname1, and fieldname2 in the second form with the same values entered through the first one. You should adjust the code to your project’s requirements.

    If you need more assistance to implement the project, we can offer you a custom coding service through our personal website:

    https://cff.dwbooster.com/customization

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Price per Square Foot’ is closed to new replies.