• Resolved creativewebdesigns03

    (@creativewebdesigns03)


    Hello,
    I have made the following changes to allow for extra fields (in this case ‘rm1’) in the property entry form.

    /views/admin/property_meta.php
    <?php iproperty_property_input_html( ‘rm1’ ); ?>

    /view_helpers/common.php
    ‘rm1’ => __( ‘Master Bedroom’, ‘iproperty’ ),

    /view_helpers/single_property.php
    $details_in_order = array(
    ‘beds’, ‘baths’, ‘sqft_building’, ‘sqft_lot’, ‘lot_type’, ‘year_built’, ‘rm1’,…..

    /classes/property.php

    ‘lot_type’,
    ‘year_built’,
    ‘rm1’,
    ….

    /install.php
    year_built VARCHAR(20),
    rm1 VARCHAR(100),

    The ‘Master Bedroom’ field does show up in the form, however I’m getting an error (empty) when I update or submit.

    Is there a limit to the # of fields? Is there another count I need to update?

    I need to have room dimensions, so I’ll need to add about 10 fields.

    I feel I’m so close. Any way to help point me in the right direction?

    https://www.ads-software.com/plugins/intellectual-property-basic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author thinkeryllc

    (@thinkeryllc)

    Hi – it looks like you did everything right, but did you actually add the new fields to the db? Adding them to the install file won’t add them to the db unless you add them before installation.

    Execute the following sql via your phpMyadmin panel or db interface and then everything should work!

    ALTER TABLEwp_iproperty_propertiesADDrm1varchar(100) NOT NULL AFTERyear_built;

    Hope it helps!

    Plugin Author thinkeryllc

    (@thinkeryllc)

    The back ticks are being treated as code, so ignore the previous post since spaces are being stripped from the sql. It should be:

    ALTER TABLE wp_iproperty_properties ADD rm1 varchar(100) NOT NULL AFTER year_built;

    Wrap the table and field names in back quotes if you’d like.

    Plugin Author thinkeryllc

    (@thinkeryllc)

    Resolved – confirmed via email

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘creating extra fields in the property listing form’ is closed to new replies.